Leave a Reply

2 comments

  1. 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 🙂