diff --git a/api/src/Framework/Login.php b/api/src/Framework/Login.php index 8549acd4a1..b145844af5 100644 --- a/api/src/Framework/Login.php +++ b/api/src/Framework/Login.php @@ -67,8 +67,19 @@ class Login $tmpl->set_block('login_form','change_password'); $tmpl->set_var('change_password', ''); $tmpl->set_var('lang_password',lang('password')); - $tmpl->set_var('cd', self::check_logoutcode($_GET['cd'])); - $tmpl->set_var('cd_class', isset($_GET['cd']) && $_GET['cd'] != 1 ? 'error' : ''); + + // display login-message depending on $_GET[cd] and what's in database/header for "login_message" + $cd_msg = self::check_logoutcode($_GET['cd']); + if (!empty($GLOBALS['egw_info']['server']['login_message'])) + { + $cd_msg = $GLOBALS['egw_info']['server']['login_message']. + // only add non-empty and not "successful loged out" message below + (!empty($cd_msg) && $cd_msg != ' ' && $_GET['cd'] != 1 ? "\n\n".$cd_msg : ''); + } + $tmpl->set_var('cd', $cd_msg); + $tmpl->set_var('cd_class', isset($_GET['cd']) && $_GET['cd'] != 1 || + !empty($GLOBALS['egw_info']['server']['login_message']) ? 'error' : ''); + $last_loginid = $_COOKIE['last_loginid']; $last_domain = $_COOKIE['last_domain']; $tmpl->set_var('passwd', '');