• Hi,

    I´m trying to make a list of users on a private page. In this list i got the user name and the user password/user_pass. My problem is now, that i can only display the encrypted password. Does anyone know how to get the decrypted version displayed?

    Thanks a lot!

    Ps. Here´s my current code.

    global $wp_roles;
    foreach( $wp_roles->role_names as $role => $name ) {
      echo '<thead> <tr> <th>Nicename</th> <th>Displayname</th> <th>Passwort</th> </tr> </thead>';
      echo '<tbody>';
    $this_role = "'[[:<:]]".$role."[[:>:]]'";
      $query = "SELECT * FROM $wpdb->users WHERE ID = ANY (SELECT user_id FROM $wpdb->usermeta WHERE meta_value RLIKE $this_role) ORDER BY user_nicename ASC LIMIT 10000";
      $users_of_this_role = $wpdb->get_results($query);
      if ($users_of_this_role) {
        foreach($users_of_this_role as $user) {
          $curuser = get_userdata($user->ID);
            echo '<tr><td>' . $curuser->user_nicename . '</td><td>' . $curuser->display_name . '</td><td>' . $curuser->user_pass . '</td></tr>';
    echo '</tbody>';

Viewing 4 replies - 1 through 4 (of 4 total)
  • Part of the reasoning behind encrypting the password in the first place is so it can’t be deciphered by anyone who gets the encrypted string…

    The answer is, you can’t, else any WordPress admin would be able to read his/her users passwords.. which could be passwords they use often (can you imagine the implications of that)…

    Thread Starter Franz Josef Kaiser

    (@f-j-kaiser)

    @t31os_: Thanks for your answer. I got your point. But how can it be that the password, that the user receives after a reset per mail, is plain text? There has to be some function that converts it… or not?

    It sends you the password before all the encryption stuff happens.

    Resetting auto generates a password, again it just sends you the pre-encrypted version… once the email is sent, it’s sent to the database and encrypted using MD5 (assuming no errors occured)..

    Thread Starter Franz Josef Kaiser

    (@f-j-kaiser)

    @t31os_: Thanks for your answer! This makes sense (in other case than mine > i have to the register the users & set the password myself). Thanks anyway!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘decrypt password in list’ is closed to new replies.