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.
| | |
| | | $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')) { |