Thomas Bruederli
2014-08-19 fc52af24f1418d6590a2d37a0d8cc31b123e38f6
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 @@
        $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 @@
                // 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 @@
                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');