• How do I disable the registration of new users without, however, disabling authentication?

    Other subject: Is there any hook to filter the email and user before being registered through social networks (new users)? Because I would like to treat the user name and email before writing them to the database. Is there any hook that gives access to all data that is retrieved from social networks when authenticating / registering users?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Heateor Support

    (@heateor)

    Yes, you can disable social registration by enabling Disable user registration via Social Login option in Basic Configuration section at Super Socializer > Social Login page in admin area.
    You can filter profile data for new users by using following code in functions.php file of active theme/child theme:

    /**
     * Filter Social profile data for new users
     */
    function heateor_ss_filter_profile_data( $temp, $profileData, $provider ) {
    	$existingUser = get_users( 'meta_key=thechamp_social_id&meta_value=' . $temp['id'] );
    	if ( count( $existingUser ) == 0 ) {
    		// new user
    		// you can filter profile data here
    	}
    	return $temp;
    }
    add_filter( 'the_champ_hook_format_profile_data', 'heateor_ss_filter_profile_data', 10, 3 );
    Thread Starter chiarelli.rj

    (@chiarellirj)

    Many thanks for the reply.

    I will try to implement as per your instructions, and I will come back to give you feedback.

    Regarding “disabling the registration of new users”: would not disable user authentication as well?

    Plugin Author Heateor Support

    (@heateor)

    Regarding “disabling the registration of new users”: would not disable user authentication as well?

    No, it will only disable NEW USER registration. Existing users would be able to Social Login without any problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable New User Registration’ is closed to new replies.