Auto Registration

How do I disable auto registration through the social login toolset?

I want users to be directed to a registration page were they can review the types of accounts they want to create, however when I expose your service on the login page, it just creates the account.

I want a way to control what your login does on my site.

Best Answer

  • Fred_PinelFred_PinelMember
    Answer ✓
    Hi,
    Perhaps this can work for you:

    1. To restrict the registration of new users you can add a filter like this:
    Add this code to the functions.php file of your WordPress templates (accessible via the dashboard -> appearance -> editor, select theme's functions).
    function oa_filter_email ( $email )
    {
       if ( ! email_exists($email))
       {
          wp_redirect ('http://url_to_registration_page');
          exit;
       }
       return $email;  
    }
    add_filter( 'oa_social_login_filter_new_user_email',  'oa_filter_email');
    
    Whenever a new users registers, the Social Login plugin checks if his email is already in the
    database and allows him to login only if this is the case.

    The url_to_registration_page is the url where the registration takes place.

    Hope this helps.

Answers

  • Fred_PinelFred_PinelMember
    edited July 2015
    Hi,

    In what environment are you using Social Login? Is it via a plugin (Wordpress...), or directly with the API?
    You can control the login procedure, it is pre-built in our plugin on some CMS.

    Thanks.
  • Yes I am using Wordpress, however in the options of your plugin, there is nothing about the workflow of the tool itself. I have version 4.6 installed from Oneall.

    I have no way to upload attachments here to show you the screen shots.
  • Hi,
    In Wordpress, our plugin settings only allow to tune account creation when the email address is missing.
    There are hooks which can be used to customize the process.
    We need to check if what you want to achieve is feasible.
    Do you want to prevent user registration, until the new user has provided some more data, such as role? What other data do you require?

    Regards
  • Hello again,

    Currently, there is no easy way to include a custom registration step via Social Login (via configuration only).
    It is possible to manually add it, but this could be tedious (see https://support.oneall.com/forums/discussion/comment/1187/#Comment_1187 for one example of hooks).

    We are adding registration customization across our plugins, but this would not be custom one.
    However, you can search for a plugin to do this extra registration step. Social Login registration would then hook into this other plugin.

    Let us know if you find such a setup, because others may also need it.
  • Really all I want to be able to do is to prevent a user from registering from my login in screen. Today when you go to the login screen, and you have never been to my site, an account gets created as soon as you click on a social link.

    I only want this action to occur on the registration page so that I can show some details before they do so. If they are on the login page and click on a social login button, it should send them to the registration page instead of just creating an account.

  • I don't want to make them register first, and then link the social login, I just want them to do the activity only from the registration page, vs anywhere the social login options are placed.
  • Ok this may work, let me go see how it operates, thank you.
  • This will work, thank you.

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.