get current user password on the profile edit page


I want to show users password on the admin profile page. I mean admin can see the other user password. I am using this code. but it shows a password for all user!

add_action(‘show_user_profile’, ‘extra_user_profile_fields’);
add_action(‘edit_user_profile’, ‘extra_user_profile_fields’);

function extra_user_profile_fields($user)
$user_info = get_userdata($user->ID);
 $wp_pass = $user_info->user_pass;

    if (current_user_can('administrator')) {
                <th><label for="email"><?php _e("Password"); ?></label></th>
                    <input type="text" name="pass" id="pass"
                           value="<?php $wp_pass; ?>"

When I vardump(get_userdata($user->ID)) its show all information about the user correctly. but it shows the same user password for all user;

D.JCode 1 month 0 Answers 24 views 0

Leave an answer