diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-15 11:47:41 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-15 11:47:41 +0000 |
| commit | b803877972dcb047d54537936da019f92d9809d3 (patch) | |
| tree | 8882d1a595613a3ede92a0fcefb0c32fc7281d1f /plugins/password/password.php | |
| parent | 449f3e4f505dda041353f622a5b8f326720e4750 (diff) | |
- Added option (password_log) for logging password changes
git-svn-id: https://svn.roundcube.net/trunk@4544 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/password/password.php')
| -rw-r--r-- | plugins/password/password.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/password/password.php b/plugins/password/password.php index b675b079c..8fc95ea86 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -128,7 +128,15 @@ class password extends rcube_plugin // try to save the password else if (!($res = $this->_save($curpwd, $newpwd))) { $rcmail->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation'); + + // Reset session password $_SESSION['password'] = $rcmail->encrypt($newpwd); + + // Log password change + if ($rcmail->config->get('password_log')) { + write_log('password', sprintf('Password changed for user %s (ID: %d) from %s', + $rcmail->user->get_username(), $rcmail->user->ID, rcmail_remote_ip())); + } } else { $rcmail->output->command('display_message', $res, 'error'); |
