X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fright_main.php;h=ffe3117b2de2ca22bf10529eb927212e51cdc1b3;hp=32715d63a8fbf95a047f0939eb3e06f2651082d7;hb=aa32c5e4a04adb6e5bc3db6a25ef736ffc267d3a;hpb=20db5033a7f36d40c7fe11d561069de9c9a2a970 diff --git a/src/right_main.php b/src/right_main.php index 32715d63..ffe3117b 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -1,6 +1,6 @@ login first."; + echo "You must login first."; exit; } if(!isset($username) || !isset($key)) { @@ -20,15 +20,15 @@ "; - echo "$errorNumber : $errorString
"; - exit; - } - $serverInfo = fgets($imapConnection, 256); - - // login - fputs($imapConnection, "1 login $username $key\n"); - $read = fgets($imapConnection, 1024); - if (strpos($read, "NO")) { - error_username_password_incorrect(); - exit; - } + $imapConnection = loginToImapServer($username, $key, $imapServerAddress); // If the page has been loaded without a specific mailbox, // just show a page of general info. if (!isset($mailbox)) { displayPageHeader("None"); general_info($motd, $org_logo, $version, $org_name); + echo ""; exit; } @@ -81,6 +68,7 @@ showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort); // close the connection + fputs($imapConnection, "1 logout\n"); fclose($imapConnection); ?>