Skip to content

Commit

Permalink
fix: pending user can log in
Browse files Browse the repository at this point in the history
  • Loading branch information
sapayth committed Feb 15, 2024
1 parent 7b1718e commit 7e40c36
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions includes/Free/Simple_Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,16 @@ public function process_login() {

return;
}

$wpuf_user_status = get_user_meta( $user->ID, 'wpuf_user_status', true );

if ( 'approved' !== $wpuf_user_status ) {
$message = __( 'You can\'t login until an administrator manually approve your account.', 'wp-user-frontend' );

$this->login_errors[] = $message;

return;
}
} else {
$creds['user_login'] = $log;
}
Expand Down

0 comments on commit 7e40c36

Please sign in to comment.