• Resolved Hasi Weragala

    (@hasinthawk)


    Hi Team

    This is not an issue, i just want to know when a person logs in using nextend social login provider

    What would be set as the passowrd for that user account, surely it can be empty right

    if it is randomly generated, would the user be notified via email about it?

    Awaiting a favorable response

    Best Regards

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Robert

    (@robertnextendweb)

    Hi @hasinthawk

    We register the users the same way as WordPress does, with a random password initially. Then the password set notification goes out from WordPress to change the password if the users wants to.

    Thread Starter Hasi Weragala

    (@hasinthawk)

    Hi Robert

    I thank you for the quick response. but alas when i was testing, i didnt get any email regarding a password.

    what would be the cause of this?

    Best Regards

    Plugin Support Laszlo

    (@laszloszalvak)

    Hi @hasinthawk

    In that case, the problem will be caused by one of these:

    • the social login didn’t actually register a new account, but most likely it linked the social media account to an existing WordPress account on your site. This could happen when:
      -previously, while you were logged in to your WordPress account you manually linked the social media account to your WordPress account via our Link button.
      -or if you didn’t then, there was an existing WordPress account on your site already, which shared the same email address as your social media account email address. In that case, we linked the social media account to the existing WordPress account automatically.
      If it was a tester WordPress account, then you should delete it from the Users table then try the registration with social login like that.
    • the provider didn’t return any email address. This means we had to register the new account without email address, so there is no where the send out registration notifications. But even in this case, the will still be informed about the default password usage. As we also set the “default_password_nag” user meta. Based on its state, WordPress will give the user a warning on the Dashboard page, which looks something like this:

    Notice: You are using the auto-generated password for your account. Would you like to change it?

    Yes, take me to my profile page | No thanks, do not remind me again

    • or maybe you disabled the WordPress default registration notifications / a third party modified the content of the email. You should check if you receive any emails to the email address that you registered with. Normally the WordPress default registration notification should look something like this:

    Username: example
    To set your password, visit the following address:
    https://example.com/wp-login.php?action=rp&key=xyxyxyxyxyxy&login=example
    https://example.com/wp-login.php

    • or your website SMPT is not configured properly, so your site can not send out emails. There are plugins which can be used for this purpose to send out test emails
    • or the email simply ended up in your Spam and Promotions folder. You should check these after you try the registration again.

    Best regards,
    Laszlo.

    Thread Starter Hasi Weragala

    (@hasinthawk)

    Hi Lazlo

    Thank you for the detailed response. There was an account already registered with the email address

    Best Regards

    Thread Starter Hasi Weragala

    (@hasinthawk)

    Hi Lazalo

    Is there any way to check whether a user is registered via social login ?

    We need to identify if a user is registered using social login feature or not

    awaiting a favorable response

    best regards

    Plugin Support Robert

    (@robertnextendweb)

    Hi @hasinthawk

    You can enable the “Show linked providers” option on the General tab:
    https://nextendweb.com/nextend-social-login-docs/global-settings/
    This will add a new column in the Users table, that shows what providers are linked to the given WordPress account. This shows manual links as well, so not just registration.

    Or if you need to run some code if the user registered with the social login, then in our developer docs:
    https://nextendweb.com/nextend-social-login-docs/backend-developer/
    You can see the “nsl_register_new_user” action. This is fired whenever we register a new user on your website with either of the providers. However, please note that we do not support custom coding.

    Thread Starter Hasi Weragala

    (@hasinthawk)

    Thank you Robert. What is the db table and the field we should look up for to get the provider (if exists).

    for an example I want to know if user with ID x has a provider.

    Plugin Support Robert

    (@robertnextendweb)

    We store the connection between the social media accounts and the WordPress accounts in this table:

    • <wp_prefix>social_users

    e.g.:

    • wp_social_users

    Here is the explanation of the database fields:

    • social_users_id – primary key of the social_users table, with auto-increment
    • ID – this is the User ID of the WordPress account that was linked to the social media account
    • type – identifies the provider the WordPress account has been linked to ( it says “google” if it is a link connected to Google)
    • identifier – the unique identifier within the social app ( e.g. the ID of a Google user ). We usually use the original social media ID returned by the provider, but in the case of some providers, that won’t be unique, so we had to make it unique with a custom logic ( currently only the Slack provider has such custom logics ).
    • register_date – contains the date when the user registered with a certain provider. (If it is NULL then the user registered with either a traditional registration form or with another social provider )
    • login_date – the date the user logged in the last time
    • link_date – the date when the user linked the social media account to the WordPress account

    So like this with a custom SQL query you can find out if the given user has the provider you are looking for.

    Thread Starter Hasi Weragala

    (@hasinthawk)

    Awesome, Many thanks for the detailed guide Robert. Truly appreciate it. Have a great day ahead!

    Thread Starter Hasi Weragala

    (@hasinthawk)

    Hi Robert

    We’ve a use case where visitors who logged in using the traditional method and later connect with their social account. So we need to identify users like that. Is there a way to do that. ?

    Because by simply checking for not null provider is not enough in this case.

    Awaiting a favorable response.

    Best Regards

    Plugin Support Robert

    (@robertnextendweb)

    We store the connection on manual linking as well, so in the database table above you will see all linked providers, regardless of whether that linking happened automatically or manually.

    If this is not enough in your use-case, then what I can recommend is to use our “nsl_{{provider-id}}_link_user” action. This will be fired whenever a link happens. This will also get triggered on registration if autolinking is enabled. However, please note that we cannot help with custom coding, so any custom code must be implemented by you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.