X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Flogin.php;h=1421ba43337e4844f4883c3003e165f748907d4d;hb=8d4de56c3a980e1ddc2cd0738a2f7b01c62f1312;hp=fd41eafe33c23557e99e58b0f202d185a7a7a6e0;hpb=1d80c108a1d741b7dcb562ea1cf6d2214322b192;p=squirrelmail.git diff --git a/src/login.php b/src/login.php index fd41eafe..1421ba43 100644 --- a/src/login.php +++ b/src/login.php @@ -3,17 +3,20 @@ /** * login.php -- simple login screen * - * Copyright (c) 1999-2003 The SquirrelMail Project Team + * Copyright (c) 1999-2004 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * * This a simple login screen. Some housekeeping is done to clean * cookies and find language. * - * $Id$ + * @version $Id$ * @package squirrelmail */ -/** Path for SquirrelMail required files. */ +/** + * Path for SquirrelMail required files. + * @ignore + */ define('SM_PATH','../'); /* SquirrelMail required files. */ @@ -26,6 +29,7 @@ require_once(SM_PATH . 'functions/page_header.php'); require_once(SM_PATH . 'functions/html.php'); require_once(SM_PATH . 'functions/global.php'); require_once(SM_PATH . 'functions/imap_general.php'); +require_once(SM_PATH . 'functions/forms.php'); /** * $squirrelmail_language is set by a cookie when the user selects @@ -55,17 +59,19 @@ header('Pragma: no-cache'); * squelches the display of the login form and puts up a message * explaining the situation. */ -$imap = sqimap_create_stream($imapServerAddress, $imapPort, $use_imap_tls); -$logindisabled = sqimap_capability($imap,'LOGINDISABLED'); -sqimap_logout($imap); -if ($logindisabled) { - $string = "The IMAP server is reporting that logins are disabled.
"; - if (!$use_imap_tls) { - $string .= "The use of TLS may allow SquirrelMail to login.
"; +if($imap_auth_mech == 'login') { + $imap = sqimap_create_stream($imapServerAddress, $imapPort, $use_imap_tls); + $logindisabled = sqimap_capability($imap,'LOGINDISABLED'); + sqimap_logout($imap); + if ($logindisabled) { + $string = "The IMAP server is reporting that logins are disabled.
"; + if (!$use_imap_tls) { + $string .= "The use of TLS may allow SquirrelMail to login.
"; + } + $string .= "Please contact your system administrator."; + error_box($string,$color); + exit; } - $string .= "Please contact your system administrator."; - error_box($string,$color); - exit; } do_hook('login_cookie'); @@ -75,7 +81,6 @@ do_hook('login_cookie'); $header = "