I trying to get password value without a hash in hook_user_presave()
, and I can do that easy when create user, I just get it in $account
variable. But when I edit user, pass in $account
in hash to because $account
data getting from database. So how i can get plain password value?
Here is my hook:
function hook_user_presave(&$edit, $account, $category) {
if (isset($account->pass)) {
$edit['field_clean_pass']['und'][0]['value'] = $account->pass;
}
}
How about Masquerade module?
If admin needs to be logged in as any user this module is what you need.
如果您想要一个答案...,您可以随时尝试使用该模块来允许网站所有者获取可读的密码: https : //www.drupal.org/project/aes
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.