// When both passwords match update admin account
if ((!empty($element)) && (isset($postData[$element]))) {
// When both passwords match update admin account
if ((!empty($element)) && (isset($postData[$element]))) {
// Update only if both passwords match
if (($postData['pass1'][$id] == $postData['pass2'][$id])) {
// Save only when both passwords are the same (also when they are empty)
// Update only if both passwords match
if (($postData['pass1'][$id] == $postData['pass2'][$id])) {
// Save only when both passwords are the same (also when they are empty)
- if (!empty($postData['pass1'][$id])) $add = sprintf(", `password`='%s'", SQL_ESCAPE($hash));
+ if (!empty($postData['pass1'][$id])) {
+ $add = sprintf(", `password`='%s'", SQL_ESCAPE($hash));
+ } // END - if
// Do we have a non-string (e.g. number, NULL, NOW() or back-tick at the beginning?
if (is_null($value[$id])) {
// Do we have a non-string (e.g. number, NULL, NOW() or back-tick at the beginning?
if (is_null($value[$id])) {
// Run it
SQL_QUERY_ESC($SQL, array(bigintval($id)), __FUNCTION__, __LINE__);
// Run it
SQL_QUERY_ESC($SQL, array(bigintval($id)), __FUNCTION__, __LINE__);
// Check which admin shall receive this mail
$result = SQL_QUERY_ESC("SELECT `admin_id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `admin_id` ASC",
array($template), __FUNCTION__, __LINE__);
// Check which admin shall receive this mail
$result = SQL_QUERY_ESC("SELECT `admin_id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `admin_id` ASC",
array($template), __FUNCTION__, __LINE__);
if (SQL_HASZERONUMS($result)) {
// Create new entry (to all admins)
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (`admin_id`, `mail_template`) VALUES (0, '%s')",
if (SQL_HASZERONUMS($result)) {
// Create new entry (to all admins)
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (`admin_id`, `mail_template`) VALUES (0, '%s')",