This repository was archived by the owner on Sep 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -680,6 +680,10 @@ public function settingsAction()
680
680
throw new Zend_Exception ('Changing password is disallowed for this user ' );
681
681
}
682
682
$ oldPass = $ this ->_getParam ('oldPassword ' );
683
+ if ($ userDao ->getSalt () == '' )
684
+ {
685
+ $ passwordHash = $ this ->User ->convertLegacyPasswordHash ($ userDao , $ oldPass );
686
+ }
683
687
$ newPass = $ this ->_getParam ('newPassword ' );
684
688
$ instanceSalt = Zend_Registry::get ('configGlobal ' )->password ->prefix ;
685
689
$ hashedPasswordOld = hash ($ userDao ->getHashAlg (), $ instanceSalt .$ userDao ->getSalt ().$ oldPass );
Original file line number Diff line number Diff line change @@ -65,6 +65,16 @@ private function _movePasswords()
65
65
}
66
66
// Set the salt and hash alg to the appropriate value to denote a legacy user
67
67
$ this ->db ->update ('user ' , array ('hash_alg ' => 'md5 ' , 'salt ' => '' ));
68
+ // Now the same for pending users
69
+ $ sql = $ this ->db ->select ()
70
+ ->from (array ('pendinguser ' ), array ('password ' ))
71
+ ->distinct ();
72
+ $ rows = $ this ->db ->fetchAll ($ sql );
73
+ foreach ($ rows as $ row )
74
+ {
75
+ $ this ->db ->insert ('password ' , array ('hash ' => $ row ['password ' ]));
76
+ }
77
+
68
78
}
69
79
}
70
80
?>
You can’t perform that action at this time.
0 commit comments