diff --git a/op/op.Login.php b/op/op.Login.php index 2719758c8..84d6eb1f7 100644 --- a/op/op.Login.php +++ b/op/op.Login.php @@ -28,6 +28,8 @@ include("../inc/inc.ClassEmail.php"); function _printMessage($heading, $message) { + UI::exitError($heading, $message); + exit; UI::htmlStartPage($heading, "login"); UI::globalBanner(); UI::pageNavigation($heading); @@ -43,7 +45,7 @@ if (isset($_REQUEST["login"])) { if (!isset($login) || strlen($login)==0) { _printMessage(getMLText("login_error_title"), "
".getMLText("login_not_given")."
\n". - "\n"); + "\n"); exit; } @@ -55,7 +57,7 @@ if (get_magic_quotes_gpc()) { $guestUser = $dms->getUser($settings->_guestID); if ((!isset($pwd) || strlen($pwd)==0) && ($login != $guestUser->getLogin())) { _printMessage(getMLText("login_error_title"), "".getMLText("login_error_text")."
\n". - "\n"); + "\n"); exit; } @@ -179,7 +181,7 @@ if (is_bool($user)) { if (($userid == $settings->_guestID) && (!$settings->_enableGuestLogin)) { _printMessage(getMLText("login_error_title"), "".getMLText("guest_login_disabled"). - "
\n\n"); + "\n\n"); exit; } @@ -188,7 +190,7 @@ if (is_bool($user)) { // (and dangerous) for passwords to be sent via GET. if (($userid != $settings->_guestID) && (md5($pwd) != $user->getPwd())) { _printMessage(getMLText("login_error_title"), "".getMLText("login_error_text"). - "
\n\n"); + "\n\n"); /* if counting of login failures is turned on, then increment its value */ if($settings->_loginFailure) { $failures = $user->addLoginFailure(); @@ -201,7 +203,7 @@ if (is_bool($user)) { // Check if account is disabled if($user->isDisabled()) { _printMessage(getMLText("login_disabled_title"), "".getMLText("login_disabled_text"). - "
\n\n"); + "\n\n"); exit; } @@ -209,7 +211,7 @@ if (is_bool($user)) { // TODO: extend control to LDAP autentication if ($user->isAdmin() && ($_SERVER['REMOTE_ADDR'] != $settings->_adminIP ) && ( $settings->_adminIP != "") ){ _printMessage(getMLText("login_error_title"), "".getMLText("invalid_user_id"). - "
\n\n"); + "\n\n"); exit; }