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!

Warn users before being registered when they are trying to log in with a wrong social account

Hi there,

I have the following problem: many of my users have multiple Google accounts. They have registered on my site thanks to OA Social Login with one of these accounts, so they have a given identity on my site, with appropriate permissions, etc.

The problem occurs when they return to my site days or weeks later: often, those (actually many of them) who have multiple Google accounts are trying to re-log on my site wile being logged in with Google with another of their Google accounts. So, they end up in being re-registered on my site with another identity, which lead to many problems:

- They appear on my site with multiple identities, with different histories and permissions. At best, I have to manually clean up the user base (they publicly appear in the official member directory). At worst, since they can post contents before I am able to do anything, we must live with several identities for the same person, which is a real mess in the community.

- When they realize they have been wrongly re-registered and logged in, they complain to me regarding the 'poor and deficient user interface for social login' (dixit some of them).

- Sometimes they don't even notice that they have re-created another identity which further lead to many problems and frustrations, for them and for me as the admin.

Could you please help me in solving this issue? I am aware of OA Social Login hooks such as 'oa_social_login_action_before_user_insert' but I don't know how to use it to warn the users that they are about to register with a new account and allow them either to confirm that this is what they want, or backtrack and switch their Google account before re-logging in on my site.

Thanks in advance for your help, I have spent many hours on this without any result yet!

Comments

  • edited January 2017
    Hi Yves,

    thank you very much for the detailed explanation!

    The problem is that we/you cannot reliably detect if one and the same person is using two different Google accounts.
    The email address will be different, as you cannot create multiple Google accounts with the same email address.
    We could maybe use the first/lastname, but this would not be 100% reliable.

    Another approach would be to increase the duration for which the users are kept logged in on your website.

    See the answer here:
    http://stackoverflow.com/questions/9191359/how-to-change-session-expire-time-in-wordpress

    Already existing users will probably go straightforward to the login page and not to the registration page. So another solution could be to disable the creation of new users on your login page. So basically if somebody connects using Google on your login page, then the plugin would display an error if there is no account yet (instead of automatically creating a new account).

    New users could then only be created on the registration page.







  • I have the same problem Claude_Schlesser. The function you provide in stackoverflow doesn't work. Is there another suggestion or advise? Please Help...

  • Hello,

    could you please tell me what exactly does not work?

    Regards,

Sign In or Register to comment.