[resolved] wp_hash_password($_POST['password']); is not equal to the pass in database. (3 posts)

  1. mediabros
    Posted 5 years ago #

    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?

  2. Mark / t31os

    Posted 5 years ago #

  3. mediabros
    Posted 5 years ago #

    I read it yes, but can't get further, made a reply at that post. Could you take a look at it?

Topic Closed

This topic has been closed to new replies.

About this Topic