Support » Fixing WordPress » wp_signon doesn't give error with wrong password

  • I am running the following code but get correct login regardless of what password I use. How can I get this to work?

    $creds = array();
    $creds[‘user_login’] = $username;
    $creds[‘user_password’] = $password;
    $creds[‘remember’] = true;
    $user = wp_signon( $creds, false );
    if (is_wp_error($user))

    {
    header(‘HTTP/1.0 401 Unauthorized’);

    }

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_signon doesn't give error with wrong password’ is closed to new replies.