Support » Requests and Feedback » Error in codex example ?

  • Hi,

    In wp_check_password, should the example :

    if ( $user = get_user_by(‘login’, $username) && wp_check_password( $pass, $user->data->user_pass, $user->ID))
    echo “That’s it”;

    not be

    if (( $user = get_user_by(‘login’, $username) ) && wp_check_password( $pass, $user->data->user_pass, $user->ID))
    echo “That’s it”;

    or just

    if ( $user = get_user_by(‘login’, $username) and wp_check_password( $pass, $user->data->user_pass, $user->ID))
    echo “That’s it”;

    because of operators precedences?

    If not why am I wrong? It works only like this for me…

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Error in codex example ?’ is closed to new replies.