diff options
Diffstat (limited to 'plugins/password/password.php')
| -rw-r--r-- | plugins/password/password.php | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/plugins/password/password.php b/plugins/password/password.php index 5ed08ed42..58b6f8cd9 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -53,6 +53,22 @@ class password extends rcube_plugin function init() { $rcmail = rcmail::get_instance(); + + $this->load_config(); + + // Exceptions list + if ($exceptions = $rcmail->config->get('password_login_exceptions')) { + $exceptions = array_map('trim', (array) $exceptions); + $exceptions = array_filter($exceptions); + $username = $_SESSION['username']; + + foreach ($exceptions as $ec) { + if ($username === $ec) { + return; + } + } + } + // add Tab label $rcmail->output->add_label('password'); $this->register_action('plugin.password', array($this, 'password_init')); @@ -73,7 +89,6 @@ class password extends rcube_plugin function password_save() { $rcmail = rcmail::get_instance(); - $this->load_config(); $this->add_texts('localization/'); $this->register_handler('plugin.body', array($this, 'password_form')); @@ -87,7 +102,6 @@ class password extends rcube_plugin $rcmail->output->command('display_message', $this->gettext('nopassword'), 'error'); } else { - $charset = strtoupper($rcmail->config->get('password_charset', 'ISO-8859-1')); $rc_charset = strtoupper($rcmail->output->get_charset()); @@ -159,7 +173,6 @@ class password extends rcube_plugin function password_form() { $rcmail = rcmail::get_instance(); - $this->load_config(); // add some labels to client $rcmail->output->add_label( |
