Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Consider the save_callback of the password field in tl_user when …
Browse files Browse the repository at this point in the history
…a back end user is forced to change his password (see #5138)
  • Loading branch information
leofeyer committed Jan 2, 2013
1 parent 7b7c0d4 commit 69a6e2a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions contao/password.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,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);
}
}

$objUser = UserModel::findByPk($this->User->id);
$objUser->pwChange = '';
$objUser->password = Encryption::hash($pw);
Expand Down
4 changes: 4 additions & 0 deletions system/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Contao Open Source CMS Changelog
Version 3.0.2 (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
Random images now open in the lightbox if configured (see #5191).

Expand Down

0 comments on commit 69a6e2a

Please sign in to comment.