Mailer project continued (heavy refactoring):
[mailer.git] / inc / modules / admin.php
index 75e43f401dfe1f14e873d82b0fcf4d931fe078fc..a9f9405431c756b8150719cd0ad679a7f5aca739 100644 (file)
@@ -64,7 +64,7 @@ if (!isAdminRegistered()) {
                $hashedPass = md5(postRequestElement('admin_pass1'));
 
                // Kill maybe existing session variables
-               destroyAdminSession(FALSE);
+               destroyAdminSession();
 
                // Do registration
                $ret = addAdminAccount(postRequestElement('admin_login'), $hashedPass, getWebmaster());
@@ -251,13 +251,13 @@ if (!isAdminRegistered()) {
                        case '404': // Administrator login not found
                                setPostRequestElement('login', $ret);
                                $ret = '{%message,ADMIN_ACCOUNT_404=' . postRequestElement('admin_login') . '%}';
-                               destroyAdminSession();
+                               destroyAdminSession(TRUE);
                                break;
 
                        case 'password': // Wrong password
                                setPostRequestElement('login', $ret);
                                $ret = '{--WRONG_PASS--} [<a href="{%url=modules.php?module=admin&amp;reset_pass=1%}">{--ADMIN_RESET_PASS--}</a>]';
-                               destroyAdminSession();
+                               destroyAdminSession(TRUE);
                                break;
 
                        default: // Others will be logged
@@ -320,7 +320,7 @@ if (!isAdminRegistered()) {
        } // END - if
 } elseif (isGetRequestElementSet('logout')) {
        // Only try to remove cookies
-       if (destroyAdminSession()) {
+       if (destroyAdminSession(TRUE)) {
                // Load logout template
                if (isGetRequestElementSet('register')) {
                        // Secure input
@@ -374,19 +374,19 @@ if (!isAdminRegistered()) {
                case '404': // Administrator login not found
                        setPostRequestElement('login', $ret);
                        displayMessage('{%message,ADMIN_ACCOUNT_404=' . getCurrentAdminId() . '%}');
-                       destroyAdminSession();
+                       destroyAdminSession(TRUE);
                        break;
 
                case 'password': // Wrong password
                        setPostRequestElement('login', $ret);
                        displayMessage('{--WRONG_PASS--}');
-                       destroyAdminSession();
+                       destroyAdminSession(TRUE);
                        break;
 
                case 'session': // Invalid admin session
                        setPostRequestElement('login', $ret);
                        displayMessage('{--INVALID_ADMIN_SESSION--}');
-                       destroyAdminSession();
+                       destroyAdminSession(TRUE);
                        break;
 
                default: // Others will be logged