Permalink
Browse files

Consider the `save_callback` of the password field in `tl_user` when …

…a back end user is forced to change his password (see #5138)
  • Loading branch information...
1 parent 06b0f24 commit c680e7fcf018cdb297c3687d7939b5aeb1da875d @leofeyer leofeyer committed Jan 28, 2013
Showing with 16 additions and 0 deletions.
  1. +4 −0 CHANGELOG.md
  2. +12 −0 contao/password.php
View
@@ -5,6 +5,10 @@ Version 2.11.9 (2013-XX-XX)
---------------------------
### Fixed
+Consider the `save_callback` of the password field in `tl_user` when a back end
+user is forced to change his password (see #5138).
+
+### Fixed
Do not group standalone lightbox elements on HTML5 pages (see #3742).
### Fixed
View
@@ -113,6 +113,18 @@ public function run()
}
else
{
+ $this->loadDataContainer('tl_user');
+
+ // Trigger the save_callback
+ if (is_array($GLOBALS['TL_DCA']['tl_user']['fields']['password']['save_callback']))
+ {
+ foreach ($GLOBALS['TL_DCA']['tl_user']['fields']['password']['save_callback'] as $callback)
+ {
+ $this->import($callback[0]);
+ $pw = $this->$callback[0]->$callback[1]($pw);
+ }
+ }
+
$strSalt = substr(md5(uniqid(mt_rand(), true)), 0, 23);
$strPassword = sha1($strSalt . $pw);

0 comments on commit c680e7f

Please sign in to comment.