【发布时间】:2013-11-08 23:19:16
【问题描述】:
我正在使用自定义脚本来更新 SocialEngine 用户密码。但是,正确设置该值后,保存时会更改。我不知道为什么。
$user = Engine_Api::_()->getItemTable('user')->fetchRow...//etc
$user->password = md5($coresalt.$newpass.$usersalt);
echo $user->password; // Correct value f115c8dddcd360bb7ccd8f801520036a
$user->save(); // Why does it get changed here?
echo $user->password; // Incorrect value 30d04d29530332248833ddfbfe6352f8
【问题讨论】:
-
你得到了什么值?
-
在编辑中添加了值。我不得不绕过框架并使用: UPDATE engine4_users SET password = MD5(CONCAT('engine4_core_settings core.secret value','$newpassword',salt)) WHERE email
标签: php zend-framework socialengine