X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fadmin%2Fwhat-admins_add.php;h=c1218df72e7cbf3317c47b0d536cfad4539fd5de;hb=cf3765c38cf0a76f396aca291f71858936e92956;hp=6bb59018e13c2e22b2ee083721885b6ff9fa6590;hpb=e2148142f8b1a8f40fd6e7ca32185569c5a9083e;p=mailer.git diff --git a/inc/modules/admin/what-admins_add.php b/inc/modules/admin/what-admins_add.php index 6bb59018e1..c1218df72e 100644 --- a/inc/modules/admin/what-admins_add.php +++ b/inc/modules/admin/what-admins_add.php @@ -18,6 +18,7 @@ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -47,17 +48,21 @@ addMenuDescription('admin', __FILE__); // Display form is default $FORM = true; -if ((isPostRequestElementSet('add')) && (isPostRequestElementSet('login')) && (isPostRequestElementSet('email')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')) && (postRequestElement('pass1') == postRequestElement('pass2'))) { - // Add admin when not added already - if (addAdminAccount(postRequestElement('login'), generateHash(postRequestElement('pass1')), postRequestElement('email')) == 'done') { - // Do not ouput any form! - $FORM = false; +// Is the form sent? +if (isFormSent('add')) { + // Check all + if ((isPostRequestParameterSet('login')) && (isPostRequestParameterSet('email')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2')) && (postRequestParameter('pass1') == postRequestParameter('pass2'))) { + // Add admin when not added already + if (addAdminAccount(postRequestParameter('login'), generateHash(postRequestParameter('pass1')), postRequestParameter('email')) == 'done') { + // Do not ouput any form! + $FORM = false; - // Admin login saved - loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ADD_DONE')); + // Admin login saved + loadTemplate('admin_settings_saved', false, '{--ADMIN_ADMINS_ADD_DONE--}'); - // Run filter chain - runFilterChain('post_admin_added', postRequestArray()); + // Run filter chain + runFilterChain('post_admin_added', postRequestArray()); + } // END - if } // END - if } // END - if