summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteffen185 <steffen.weber@gmail.com>2013-04-02 09:42:49 +0300
committerSteffen185 <steffen.weber@gmail.com>2013-04-02 09:42:49 +0300
commit859a7a117acd8c7830a53a8c528790612e1638c4 (patch)
tree799967bc253f88f45bdcd44bee4f1d4c8316ef1b
parentb343adf3cb316b15d6751dc723f8e9348a3e4502 (diff)
Fixed wrong copy-paste
-rw-r--r--plugins/password/password.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/password/password.php b/plugins/password/password.php
index 43cab7f5e..e16b4d0b9 100644
--- a/plugins/password/password.php
+++ b/plugins/password/password.php
@@ -146,9 +146,13 @@ class password extends rcube_plugin
else if ($check_strength && (!preg_match("/[0-9]/", $newpwd) || !preg_match("/[^A-Za-z0-9]/", $newpwd))) {
$rcmail->output->command('display_message', $this->gettext('passwordweak'), 'error');
}
- // try to save the password
+ // password is the same as the old one, do nothing, return success
else if ($sespwd == $newpwd && !$rcmail->config->get('password_force_save')) {
$rcmail->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
+ }
+ // try to save the password
+ 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(