roundcubemail/plugins/password/password.php
private function check_host_login_exceptions()
    {
        $rcmail = rcmail::get_instance();

        // Host exceptions
        $hosts = $rcmail->config->get('password_hosts');
        if (!empty($hosts) && !in_array($_SESSION['storage_host'], (array) $hosts)) {
            return false;
        }

        // Login exceptions
        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 false;
                }
            }
        }

        return true;
    }
private function check_host_login_exceptions()
    {
        $rcmail = rcmail::get_instance();

        // Host exceptions
        $hosts = $rcmail->config->get('password_hosts');
        if (!empty($hosts) && !in_array($_SESSION['storage_host'], (array) $hosts)) {
            return false;
        }

        // Login exceptions
        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 false;
                }
            }
        }

        return true;
    }
private function check_host_login_exceptions ( ) { $ rcmail = rcmail :: get_instance ( ) ; // Host exceptions $ hosts = $ rcmail -> config -> get ( 'password_hosts' ) ; if ( ! empty ( $ hosts ) && ! in_array ( $ _SESSION [ 'storage_host' ] , ( array ) $ hosts ) ) { return false ; } // Login exceptions 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 false ; } } } return true ; }
Check if host and login is allowed to change the password, false = not allowed, true = not allowed
Check if host and login is allowed to change the password false = not allowed true = not allowed