Redirect a user until approved
-
I want users who have registered but have not been approved by the administrator to be redirected to another page. Not when he registers but if they try to connect again before the approval. I have used the code below and it works but only when you register and the next time you log in to the website
add_action( ‘user_register’,function( $user_id ){
$user_status=get_user_meta( $user_id, ‘pw_user_status’,true );
if(“pending”==$user_status)
{
wp_logout();
$url=’https://www.support-informatics.eu’;
//wp_redirect(home_url());
wp_redirect($url);
exit;
}
},99999999999999);The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Redirect a user until approved’ is closed to new replies.