Merge pull request #42 from NETLINK/patch-1

Add option to define IMAP hosts that support password changes
pull/46/merge
Aleksander Machniak 12 years ago
commit 657864a29c

@ -1,5 +1,14 @@
<?php
// Supported hosts
// -----------------------
// Array of hosts that support password changing.
// Default is NULL. Supported hosts will feature
// a Password option in Settings; others will not.
// Example:
//$rcmail_config['password_supported_hosts'] = array( 'mail.example.com', 'mail2.example.org' );
$rcmail_config['password_supported_hosts'] = NULL;
// Password Plugin options
// -----------------------
// A driver to use for password change. Default: "sql".

@ -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