-
- /* Set the login variables. */
- $user_is_logged_in = true;
- $just_logged_in = true;
-
- /* And register with them with the session. */
- session_register ('user_is_logged_in');
- session_register ('just_logged_in');
-
- /* parse the accepted content-types of the client */
- $attachment_common_types = array();
- $attachment_common_types_parsed = array();
- session_register('attachment_common_types');
- session_register('attachment_common_types_parsed');
-
- $debug = false;
- if (isset($HTTP_SERVER_VARS['HTTP_ACCEPT']) &&
- !isset($attachment_common_types_parsed[$HTTP_SERVER_VARS['HTTP_ACCEPT']]))
- attachment_common_parse($HTTP_SERVER_VARS['HTTP_ACCEPT'], $debug);
- if (isset($HTTP_ACCEPT) &&
- !isset($attachment_common_types_parsed[$HTTP_ACCEPT]))
- attachment_common_parse($HTTP_ACCEPT, $debug);
-
-
- /* Complete autodetection of Javascript. */
- checkForPrefs($data_dir, $username);
- $javascript_setting = getPref($data_dir, $username, 'javascript_setting', SMPREF_JS_AUTODETECT);
- $js_autodetect_results = (isset($js_autodetect_results) ? $js_autodetect_results : SMPREF_JS_OFF);
+ sqimap_logout($imapConnection);
+ session_register('delimiter');
+ global $username;
+ $username = $login_username;
+ session_register ('username');
+ setcookie('key', $key, 0, $base_uri);
+ do_hook ('login_verified');
+
+}
+
+/* Set the login variables. */
+$user_is_logged_in = true;
+$just_logged_in = true;
+
+/* And register with them with the session. */
+session_register ('user_is_logged_in');
+session_register ('just_logged_in');
+
+/* parse the accepted content-types of the client */
+$attachment_common_types = array();
+$attachment_common_types_parsed = array();
+session_register('attachment_common_types');
+session_register('attachment_common_types_parsed');
+
+$debug = false;
+if (isset($HTTP_SERVER_VARS['HTTP_ACCEPT']) &&
+ !isset($attachment_common_types_parsed[$HTTP_SERVER_VARS['HTTP_ACCEPT']])) {
+ attachment_common_parse($HTTP_SERVER_VARS['HTTP_ACCEPT'], $debug);
+}
+if (isset($HTTP_ACCEPT) &&
+ !isset($attachment_common_types_parsed[$HTTP_ACCEPT])) {
+ attachment_common_parse($HTTP_ACCEPT, $debug);
+}
+
+/* Complete autodetection of Javascript. */
+$javascript_setting = getPref
+ ($data_dir, $username, 'javascript_setting', SMPREF_JS_AUTODETECT);
+$js_autodetect_results = (isset($js_autodetect_results) ?
+ $js_autodetect_results : SMPREF_JS_OFF);
+/* See if it's set to "Always on" */
+$js_pref = SMPREF_JS_ON;
+if ($javascript_setting != SMPREF_JS_ON){