Nextend Social Login – How To Assign Role Upon Registration

If you would like to automatically assign a specific role to users that register on your website using the Nextend Social Login And Register plugin, add the following code to your functions.php file.  Change “editor” to the role of your choosing.

add_action('nsl_facebook_register_new_user', 'uwp_RoleFunction', 11);

function uwp_RoleFunction($user_id){
        $user = new WP_User($user_id);