summaryrefslogtreecommitdiff
path: root/plugins/password/password.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/password/password.php')
-rw-r--r--plugins/password/password.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/password/password.php b/plugins/password/password.php
index 6d3042b5f..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');
@@ -232,8 +240,8 @@ class password extends rcube_plugin
$result = password_save($curpass, $passwd);
if (is_array($result)) {
- $result = $result['code'];
$message = $result['message'];
+ $result = $result['code'];
}
switch ($result) {