summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/password/package.xml1
-rw-r--r--plugins/password/password.php6
2 files changed, 6 insertions, 1 deletions
diff --git a/plugins/password/package.xml b/plugins/password/package.xml
index 28f82a43d..a4f74c192 100644
--- a/plugins/password/package.xml
+++ b/plugins/password/package.xml
@@ -29,6 +29,7 @@
<notes>
- When old and new passwords are the same, do nothing, return success (#1487823)
- Fixed Samba password hashing in 'ldap' driver
+- Added 'password_change' hook for plugin actions after successful password change
</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/password/password.php b/plugins/password/password.php
index c79f55ef2..b1c7863fc 100644
--- a/plugins/password/password.php
+++ b/plugins/password/password.php
@@ -134,8 +134,12 @@ class password extends rcube_plugin
else if (!($res = $this->_save($curpwd, $newpwd))) {
$rcmail->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
+ // allow additional actions after password change (e.g. reset some backends)
+ $plugin = $rcmail->plugins->exec_hook('password_change', array(
+ 'old_pass' => $curpwd, 'new_pass' => $newpwd));
+
// Reset session password
- $_SESSION['password'] = $rcmail->encrypt($newpwd);
+ $_SESSION['password'] = $rcmail->encrypt($plugin['new_pass']);
// Log password change
if ($rcmail->config->get('password_log')) {