Is it possible to sign in with user_email in WordPress? olatechproMarch 2, 20231 Views is it possible to sign in with user_email instead of user_login, please ? Thanks. Post Views: 1 Related postsGet rid of this Strict Standards warningWooCommerce: get_current_screen not working with multi languageCan’t login on WordPressForce HTTPS using .htaccess – stuck in redirect loopWordPress: Ajax not working to insert, query and result dataHow Can I pass an image file to wp_handle_upload?
Here’s how we do it: $user = get_user_by('email', $email); if (wp_check_password($password, $user->user_pass, $user->ID)) { // Login successfull, redirect if needed wp_set_auth_cookie($user->ID); } Assuming of course that you got the $email and the $password variables from a POST request or something 🙂 Log in to Reply
Here’s how we do it:
Assuming of course that you got the $email and the $password variables from a POST request or something 🙂
Search and you will find… WP Email Login