【问题标题】:Incorrect Password Value on Save in SocialEngine / Zend FrameworkSocialEngine / Zend 框架中保存时的密码值不正确
【发布时间】: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


【解决方案1】:

您可以通过如下设置密码来更新engine4_users:

password = MD5(CONCAT('engine4_core_settings core.secret value','$newpassword',salt))

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-12-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多