]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin.php
New re-hashing of passords while login should work now
[mailer.git] / inc / modules / admin.php
index ad94f73f267ba03ca83d9788381c53f0ecf0c27e..cb73fecea022525744d1f1f26211dd5dd1e4eb67 100644 (file)
@@ -161,27 +161,21 @@ if (!isBooleanConstantAndTrue('admin_registered')) {
                switch ($ret)
                {
                case "done": // Admin and password are okay, so we log in now
-                       // Try to register the session variables
-                       if ((set_session("admin_md5", generatePassString(generateHash($_POST['pass'], __SALT)))) && (set_session("admin_login", $_POST['login'])) && (set_session("admin_last", time())) && (set_session("admin_to", $_POST['timeout']))) {
-                               // Construct URL and redirect
-                               $URL = URL."/modules.php?module=admin&";
-
-                               // Rewrite overview module
-                               if ($GLOBALS['what'] == "overview") {
-                                       $GLOBALS['action'] = GET_ACTION($GLOBALS['module'], $GLOBALS['what']);
-                               }
-
-                               // Add data to URL
-                               if (!empty($GLOBALS['what'])) $URL .= "what=".$GLOBALS['what'];
-                                elseif (!empty($GLOBALS['action'])) $URL .= "action=".$GLOBALS['action'];
-                                elseif (!empty($_GET['area'])) $URL .= "area=".$_GET['area'];
+                       // Construct URL and redirect
+                       $URL = URL."/modules.php?module=admin&";
 
-                               // Load URL
-                               LOAD_URL($URL);
-                       } else {
-                               OUTPUT_HTML("<STRONG class=\"admin_fatal\">".ADMIN_LOGIN_FAILED."</STRONG>");
-                               ADD_FATAL(CANNOT_REGISTER_SESS);
+                       // Rewrite overview module
+                       if ($GLOBALS['what'] == "overview") {
+                               $GLOBALS['action'] = GET_ACTION($GLOBALS['module'], $GLOBALS['what']);
                        }
+
+                       // Add data to URL
+                       if (!empty($GLOBALS['what'])) $URL .= "what=".$GLOBALS['what'];
+                        elseif (!empty($GLOBALS['action'])) $URL .= "action=".$GLOBALS['action'];
+                        elseif (!empty($_GET['area'])) $URL .= "area=".$_GET['area'];
+
+                       // Load URL
+                       LOAD_URL($URL);
                        break;
 
                case "404": // Administrator login not found