diff options
Diffstat (limited to 'plugins/password/password.php')
-rw-r--r-- | plugins/password/password.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/password/password.php b/plugins/password/password.php index 58b6f8cd9..806db0586 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -3,7 +3,7 @@ /* +-------------------------------------------------------------------------+ | Password Plugin for Roundcube | - | @version @package_version@ | + | @version @package_version@ | | | | Copyright (C) 2009-2010, Roundcube Dev. | | | @@ -56,7 +56,13 @@ class password extends rcube_plugin $this->load_config(); - // Exceptions list + // Host exceptions + $hosts = $rcmail->config->get('password_hosts'); + if (!empty($hosts) && !in_array($_SESSION['storage_host'], $hosts)) { + return; + } + + // Login exceptions if ($exceptions = $rcmail->config->get('password_login_exceptions')) { $exceptions = array_map('trim', (array) $exceptions); $exceptions = array_filter($exceptions); @@ -158,7 +164,7 @@ class password extends rcube_plugin // 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())); + $rcmail->get_user_name(), $rcmail->user->ID, rcmail_remote_ip())); } } else { @@ -274,8 +280,10 @@ class password extends rcube_plugin return; case PASSWORD_CRYPT_ERROR; $reason = $this->gettext('crypterror'); + break; case PASSWORD_CONNECT_ERROR; $reason = $this->gettext('connecterror'); + break; case PASSWORD_ERROR: default: $reason = $this->gettext('internalerror'); |