Jump to content

Unable to use AddClient or LoginShare with new user


Nox1

Recommended Posts

Hi,

I am running out of ideas right now on how to work with the LoginShare hook. In my scenario (and since users are now available) a client sends an invitation to his account. Once on the login page, the user enters username and password and with my LoginShare hook I am checking his credentials against my own database. This works well for existing customers.

However, if the user does not exist I am trying to pass the "create" option with the return value:

function loginshare_hook($vars) {

     $username = $vars['username'];
     $password = $vars['password'];
    
    // My code checking the password was removed to improve readability (and this part works though)
        

	//and now i am trying to return the user with the "create" flag:

        return array(
                'email' => $username,
                'create' => true,
                'firstname' => 'Demo',
                'lastname' => 'User',
                'companyname' => 'Demo Company',
                'address1' => '123 Demo Street',
                'address2' => 'Sample',
                'city' => 'Sample',
                'state' => 'Sample',
                'postcode' => 'XYZ123',
                'country' => 'US',
                'phonenumber' => '123456789',
                'password' => 'abc123',
        ); 
     }

 

Using xdebug i get the following error:
"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'email_preferences' in 'field list'"

I have no idea what that could mean - however, when I checked the user table I saw that one user was created, however the login fails and I again see the restricted / login page.
In addition to that users that are not associated with clients (linked to id 0 in the clientsuser table) are also unable to login using this method...

Any help is really appreciated...

 

Regards

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated