]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-edit_user.php
Updated copyright notice as there are changes in this year
[mailer.git] / inc / modules / admin / what-edit_user.php
index 73b1ff59781ee020139f24d0c26daf5989f77b82..0e5686fba02a925d1c9eb1231add5946e20fb651 100644 (file)
@@ -18,7 +18,7 @@
  * @TODO Add support for ext-country                                    *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -46,13 +46,13 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addYouAreHereLink('admin', __FILE__);
 
 // Fix a notice
-$result_main = false;
+$result_main = FALSE;
 if (isGetRequestElementSet('userid')) {
        // Load user entry
        $result_main = SQL_QUERY_ESC("SELECT
-       `userid`,`gender`,`surname`,`family`,`street_nr`,`zip`,`city`,`country`,
+       `userid`, `gender`, `surname`, `family`, `street_nr`, `zip`, `city`, `country`,
        `email`,
-       `birth_day`,`birth_month`,`birth_year`,
+       `birth_day`, `birth_month`, `birth_year`,
        `max_mails`
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
@@ -71,17 +71,17 @@ if ((!isGetRequestElementSet('userid')) || (SQL_NUMROWS($result_main) == 1)) {
                addMemberSelectionBox();
        } elseif (isFormSent('edit')) {
                // Ok, change the account...
-               $updateUser = false; $add = '';
-               if ((!isPostRequestElementSet('pass1')) && (!isPostRequestElementSet('pass2'))) {
+               $updateUser = FALSE; $add = '';
+               if ((!isPostRequestElementSet('password1')) && (!isPostRequestElementSet('password2'))) {
                        // Don't change the password
-                       $updateUser = true;
-               } elseif ((postRequestElement('pass1') == postRequestElement('pass2'))) {
+                       $updateUser = TRUE;
+               } elseif ((postRequestElement('password1') == postRequestElement('password2'))) {
                        // Change the password
-                       $updateUser = true;
-                       $add = ",`password`='" . generateHash(postRequestElement('pass1')) . "'";
+                       $updateUser = TRUE;
+                       $add = ",`password`='" . generateHash(postRequestElement('password1')) . "'";
                }
 
-               if ($updateUser === true) {
+               if ($updateUser === TRUE) {
                        // We have to add the following things: birthday and max receive mails
                        SQL_QUERY_ESC("UPDATE
        `{?_MYSQL_PREFIX?}_user_data`
@@ -122,11 +122,11 @@ LIMIT 1",
                $content = SQL_FETCHARRAY($result_main);
 
                // Load template
-               loadTemplate('admin_edit_user', false, $content);
+               loadTemplate('admin_edit_user', FALSE, $content);
        }
 } else {
        // Account does not exists!
-       loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}');
+       displayErrorMessage('{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}');
 }
 
 // Free the result