summaryrefslogtreecommitdiff
path: root/plugins/password/password.php
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-03-07 09:48:33 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-03-07 09:48:33 +0000
commitbeb5bc650559db7771a78e57cecbe6c4fccbd4aa (patch)
tree2b184cb35adfa92b034ad27291dfe0e12ffb7cad /plugins/password/password.php
parentf8d88136b727520db85925ce53b24aa5819ffb1e (diff)
- Added pw_usermod driver (#1487826)
- Added option password_login_exceptions (#1487826) git-svn-id: https://svn.roundcube.net/trunk@5973 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/password/password.php')
-rw-r--r--plugins/password/password.php19
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(