Update plugins/password/password.php

Add logic for checking supported IMAP hosts

Make use of additional config option
'password_supported_hosts' (see config.inc.php.dist).
If current IMAP host is not in array of defined
hosts, exit and suppress Password option in Settings.
pull/42/head
NETLINK 12 years ago
parent 32395bde1a
commit 7978f872cb

@ -56,6 +56,12 @@ class password extends rcube_plugin
$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')) {
$exceptions = array_map('trim', (array) $exceptions);

Loading…
Cancel
Save