소스 검색

Added session variable $is_logged_in.

gustavf 25 년 전
부모
커밋
def46d09db
1개의 변경된 파일12개의 추가작업 그리고 3개의 파일을 삭제
  1. 12 3
      src/webmail.php

+ 12 - 3
src/webmail.php

@@ -25,10 +25,19 @@
    include ("../config/config.php");
    include ("../functions/prefs.php");
    include ("../functions/imap.php");
+   if (!isset($plugin_php))
+      include ("../functions/plugin.php");
+
+   if ($is_logged_in != true) {
+      do_hook ("login_before");
+      // verify that username and password are correct
+      $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+      do_hook ("login_verified");
+   }
+
+   session_register ("is_logged_in");
+   $is_logged_in = true;
 
-   // verify that username and password are correct
-   $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
-   
    include ("../src/load_prefs.php");
 
    echo "<html><head\n";