PMA\libraries\plugins\AuthenticationPlugin::getErrorMessage PHP Метод

getErrorMessage() публичный Метод

Returns error message for failed authentication.
public getErrorMessage ( ) : string
Результат string
    public function getErrorMessage()
    {
        if (!empty($GLOBALS['login_without_password_is_forbidden'])) {
            return __('Login without a password is forbidden by configuration' . ' (see AllowNoPassword)');
        } elseif (!empty($GLOBALS['allowDeny_forbidden'])) {
            return __('Access denied!');
        } elseif (!empty($GLOBALS['no_activity'])) {
            return sprintf(__('No activity within %s seconds; please log in again.'), intval($GLOBALS['cfg']['LoginCookieValidity']));
        } else {
            $dbi_error = $GLOBALS['dbi']->getError();
            if (!empty($dbi_error)) {
                return htmlspecialchars($dbi_error);
            } elseif (isset($GLOBALS['errno'])) {
                return '#' . $GLOBALS['errno'] . ' ' . __('Cannot log in to the MySQL server');
            } else {
                return __('Cannot log in to the MySQL server');
            }
        }
    }