We are glad to welcome you to our Community Support Forums!
These forums are your way of communicating with the community of people developing and using tools provided by the OneAll platform.
The forums are run by the community and moderated by the OneAll team during office hours. Please stick to technical issues - and remember, no confidential information - these are public forums!

DB Password changed, Oneall plugin fails

Hi, I had to change the database password and update the password in Drupal recently. After I did it (and I do not find any other possible reason) every time user clicks on the social icon he gets newly registered (the system assigns him a new name), and logging in is impossible, it is always processed as a new registration. In drupal my settings are DO NOT SHOW everywhere (I pull the social block on a specific page only), Automatically approve newly registered users through OneAll, and Automatically create new user and create a bogus email if Social network provides no email...
The social networks DO provide email, I checked... But OneAll puts into the database bogus emails instead

Drupal settings say new users need approval of admin, but OneAll is set up to override this, as I said.

Any idea what I am doing wrong? Maybe I should update the db password somewhere with you too?

http://turkish4dummies.com/access/

Best Answers

  • Answer ✓
    Claude, where are you, I figured it out.

    1. The authmap table without previous path is OK and works (I am on Drupal 7 and I am sure I installed D7 version of your plugin, so just take note).
    2. The problem I was looking at is = on some attempts to register a new account the system falls back to manual registration, while some attempts ARE successful.
    3. What happens is that there were some users registered through D7 directly, previously to installing OneAll plugin.
    When an attempt to register is made from the social network where user's email address coincides with the email address already existing in my db (even if they got registered under different username), they fall back to manual registration, which as if wants to say "HEY YOU ALREADY HAVE A USER with this email address here, though not created through OneAll. Go and just log in with your old user manually". In all other cases it works smoothly.

    So my current problem may considered to be solved, for I will just erase from the db all old users, so that all of them could use OneAll to access.

    I still do not know what caused the initial issue of not seeing existing users but always creating new ones, but installing db backup from the las working day solved it in my case.

    HUGE THANKS for talking to me, it helped a lot!
  • Thank you for the updated! I'm glad to that it works now!

Answers

  • Hello,

    We do not need your database password.
    To recognize returning users, the plugin used two tables:
    oneall_social_login_authmap
    oneall_social_login_identities
    If you remove these tables or delete the values from it,
    then the plugin can no longer recognize returning users and will create new users.

    Have you recently modified your database? Maybe rolled back an older backup or something like this?

    For which social networks are the email addresses missing?

    Regards,
  • edited May 17
    Hi Claude, thank you so much for replying.
    I installed the Drupal OneAll Module again, so that it could rewrite any possible database errors. There are 2 tables now in the database - oneall_social_login_settings and oneall_social_login_identities. oneall_social_login_authmap is NOT there, and it still works the same way - does not recognize an old user but creates a new account for him instead.... At what stage those tables are actually created? When I install a module, right?... I am on Drupal 7 if it matters...

    It fails on all social networks that I had (facebook, Instagram, g+...), while all of them DO supply email addresses. It just looks like there is no table to store user_token anywhere....
  • edited May 17
    Look, I found in my db a table authmap (without any previous path) that has some data stored in it... Controlled by your plugin. The Drupal module has created it like this... Maybe I should rename the table into oneall_social_login_authmap to see if it starts working?

    Its fields are aid/uid/authname/module
  • It was not the table name. As it worked well till yesterday I restored yesterday's database and the tables are exactly the same, and it does allow users log in instead of registering new users now, I have no idea why.
    BUT... See what happens... Registration method is set up as auto_manual_email (you understand what it means, right?). And it does register with G+ and with SOME account of Youtube (not all). On the rest (facebook for example) it falls back to the manual registration form where username and email address, retrieved from the social network, are pre-populated.
    It used to work well till yesterday, social network config is good then. What do you think might cause it now?
  • edited May 17
    Hello,

    the table authmap is a Drupal table, do not rename or alter it.
    The table that is missing is oneall_social_login_authmap.

    This table is required for Social Login for Drupal 7.
    If the table is missing, it's not possible to recognize users, but you should also see error messages in your PHP logs.
    Do you have any errors in your PHP/Drupal logs?

    Are you sure that you have installed the Drupal 7 plugin?
    If you have by error installed the Drupal 8 plugin, the table will not be created as we have removed it for Drupal 8.

    Here the SQL to create the table:

    CREATE TABLE IF NOT EXISTS `oneall_social_login_authmap` (
    `aid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The primary key of this table.',
    `uid` int(10) unsigned NOT NULL COMMENT 'User id.',
    `user_token` varchar(48) NOT NULL COMMENT 'Unique user_token for a social network user, returned by the OneAll API.',
    PRIMARY KEY (`aid`)
    ) ENGINE=InnoDB ;

  • Are you sure it is Drupal's?
    Look what it has inside

    image

    And the structure
    image


    Looks like something yours... And it collects users that log in through social plugins...
  • image

    Here is the log. The 3 mistakes they are ours on that page, not related to your plugin but to the scripts on the page where you get redirected.
Sign in with your OneAll account to take part in the discussion.