Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

is it possible to sign in with user_email instead of user_login, please ?

Thanks.

share|improve this question
    
You could build a plugin that replaces the username with the user email when they register. –  Alex Older Aug 4 '11 at 9:54
add comment

2 Answers 2

up vote 4 down vote accepted

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 :)

share|improve this answer
add comment

Search and you will find... WP Email Login

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.