X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin.php;h=69dc30b7c0d870dff917777cd8c67f08c4f26e3b;hb=5e7345f4959aacc2d5be0098f474770b483a0869;hp=75e43f401dfe1f14e873d82b0fcf4d931fe078fc;hpb=e70705822fea03b38b81c919993070f574ad212b;p=mailer.git diff --git a/inc/modules/admin.php b/inc/modules/admin.php index 75e43f401d..69dc30b7c0 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -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()); @@ -128,7 +128,7 @@ if (!isAdminRegistered()) { $content['error_message'] = ''; // Yet-another notice-fix - if ((isFormSent()) && (postRequestElement('ok') == '***')) { + if ((isFormSent('add_first_admin')) && (postRequestElement('ok') == '***')) { // Init variables $loginMessage = ''; $pass1Message = ''; @@ -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--} [{--ADMIN_RESET_PASS--}]'; - 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