summaryrefslogtreecommitdiff
path: root/plugins/password/password.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-02-16 10:48:11 +0000
committeralecpl <alec@alec.pl>2011-02-16 10:48:11 +0000
commit207cc0b9b3cfdfb29e4f02e83014320fd12eeb68 (patch)
tree2409f20c1b1d83413f39a274333df59137052617 /plugins/password/password.php
parent1a2754d18ca079ea55e4c272d7cdc9dc33c00179 (diff)
- Applied plugin changes since 0.5-stable release
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) {