Deny a user role to log in after register
What you want to do is hook into the authenticate hook, check if the user has the pending role, and if so, throw an error. //* Add filter to the authenticate hook add_filter( ‘authenticate’, ‘wpse_263762_authenticate’, 20, 3 ); function wpse_263762_authenticate( $user, $username, $password ) { //* Check if the user has the pending role if( … Read more