WordPress.org

Forums

Error in codex example ? (2 posts)

  1. Boulli
    Member
    Posted 2 years ago #

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

  2. keesiemeijer
    moderator
    Posted 2 years ago #

    If you want you can edit the codex yourself by logging in with your WordPress forum username and password:

    http://make.wordpress.org/support/handbook/contributing-to-the-wordpress-codex/
    http://codex.wordpress.org/index.php?title=Special:UserLogin&returnto=Main_Page

Topic Closed

This topic has been closed to new replies.

About this Topic