Support » Plugins » Hacks » wp_hash_password($_POST['password']); is not equal to the pass in database.

  • Resolved mediabros


    Hi there,

    I am trying to make my own ajax login, the jquery part works fine so far. the only problem i’ve got is with the comparing of the two passwords, the one posted in the form and the one in the database.

    here is how i get the posted values.

    $user_name = htmlspecialchars($_POST['username'],ENT_QUOTES);
    $pass = wp_hash_password($_POST['password']);

    To get the userdetails out of the database is use:

    $userinfo = get_userdatabylogin($user_name);

    no i can get all data that is on that row, just by echoing this for example:

    echo $userinfo->user_pass;
    echo $userinfo->ID;
    echo $userinfo->user_login;

    It all prints out fine, earlier i putting the posted password that came with the formpost into the $pass variable.

    The strange this is that

    echo $userinfo->user_pass;


    echo $pass;

    do not match!

    I did a pass reset ofcourse to be sure. Anyone has a clue what is going on?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_hash_password($_POST['password']); is not equal to the pass in database.’ is closed to new replies.