]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin.php
Install fix
[mailer.git] / inc / modules / admin.php
index e7aabd542decdb44844cb008233164661fd5712f..c0e1fdf48a4c581180ac6f9475013f3f86d9121d 100644 (file)
@@ -56,18 +56,15 @@ if (!isBooleanConstantAndTrue('admin_registered')) {
        // Admin is not registered so we have to inform the user
        if ((isset($_POST['ok'])) && ((empty($_POST['login'])) || (empty($_POST['pass'])) || (strlen($_POST['pass']) < 4))) $_POST['ok'] = "***";
        if ((isset($_POST['ok'])) && ($_POST['ok'] != "***")) {
-               // Hash the password with our new generateHash() function
-               $hashedPass = generateHash($_POST['pass']);
-
-               // If the password has not been hashed we have to fall-back to md5()
-               if ($hashedPass == $_POST['pass']) $hashedPass = md5($hashedPass);
+               // Hash the password with the old function because we are here in install mode
+               $hashedPass = md5($hashedPass);
 
                // Do registration
                $ret = REGISTER_ADMIN($_POST['login'], $hashedPass);
                switch ($ret)
                {
                case "done":
-                       admin_WriteData(PATH."inc/config.php", "ADMIN-SETUP", "define ('admin_registered', ", ");", "true", 0);
+                       admin_WriteData(PATH."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
                        if (!_FATAL) {
                                // Registering is done
                                LOAD_URL(URL."/modules.php?module=admin&amp;action=login&register=done");
@@ -91,7 +88,7 @@ if (!isBooleanConstantAndTrue('admin_registered')) {
                        }
                        if (!isBooleanConstantAndTrue('admin_registered')) {
                                // Write to config that registration is done
-                               admin_WriteData(PATH."inc/config.php", "ADMIN-SETUP", "define ('admin_registered', ", ");", "true", 0);
+                               admin_WriteData(PATH."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
 
                                // Load URL for login
                                $URL = URL."/modules.php?module=admin&amp;action=login";