summaryrefslogtreecommitdiff
path: root/plugins/password/password.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-11-16 10:42:57 -0800
committerAleksander Machniak <alec@alec.pl>2012-11-16 10:42:57 -0800
commit657864a29c96b15069a304693cc557b1d9b27b1c (patch)
tree379704fda7918939f40ad03fd3d17fb24c3649b7 /plugins/password/password.php
parentdd759730b0d2e7ac75e2011997e6cb654065590a (diff)
parent204e1e03e9cd6a9007e4fc7ff4202b09dc9ea2b2 (diff)
Merge pull request #42 from NETLINK/patch-1
Add option to define IMAP hosts that support password changes
Diffstat (limited to 'plugins/password/password.php')
-rw-r--r--plugins/password/password.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/password/password.php b/plugins/password/password.php
index e795d115f..cd0f5f1e0 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. |
| |
@@ -55,6 +55,12 @@ class password extends rcube_plugin
$rcmail = rcmail::get_instance();
$this->load_config();
+
+ $host = isset( $_SESSION['imap_host'] ) ? $_SESSION['imap_host'] : NULL;
+ $hosts = $rcmail->config->get( 'password_supported_hosts' );
+ if ( !empty( $hosts ) and !in_array( $host, $hosts ) ) {
+ return;
+ }
// Exceptions list
if ($exceptions = $rcmail->config->get('password_login_exceptions')) {