* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Some security stuff...
if (!defined('__SECURITY')) {
- die();
+ exit();
} elseif (!isMember()) {
redirectToIndexMemberOnlyModule();
}
return;
} // END - if
-$isValid = false;
+$isValid = FALSE;
if (isFormSent()) {
// Nickname was submitted so let's check if it is not already in use
} // END - if
} // END - if
-if ($isValid === true) {
+if ($isValid === TRUE) {
// Nickname already in use which is the default
$content = '{--MEMBER_NICKNAME_ALREADY_IN_USE--}';
// Look for nickname in database (we only need just one entry so don't worry about the "LIMIT 1" !)
$result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' AND `userid` != %s LIMIT 1",
- array(postRequestElement('nickname'), getMemberId()), __FILE__, __LINE__);
+ array(
+ postRequestElement('nickname'),
+ getMemberId()
+ ), __FILE__, __LINE__);
// Is it not in use?
if (SQL_HASZERONUMS($result)) {
- // Nickname not in use, so set it now
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `nickname`='%s' WHERE `userid`=%s LIMIT 1",
- array(postRequestElement('nickname'), getMemberId()), __FILE__, __LINE__);
-
// Prepare array
$filterData = array(
'history_subject' => 'NICKNAME_CHANGED',
// Run filter chain
runFilterChain('add_history_entry', $filterData);
+ // Nickname not in use, so set it now
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `nickname`='%s' WHERE `userid`=%s LIMIT 1",
+ array(
+ postRequestElement('nickname'),
+ getMemberId()
+ ), __FILE__, __LINE__);
+
// Change message
$content = '{--MEMBER_NICKNAME_SAVED--}';
} // END - if
// Load template
displayMessage($content);
} else {
- // Do we have already submit the form?
+ // Is there already submit the form?
if (isPostRequestElementSet('nickname')) {
- loadTemplate('admin_settings_unsaved', false, '{--MEMBER_NICKNAME_IS_INVALID--}');
+ loadTemplate('admin_settings_unsaved', FALSE, '{--MEMBER_NICKNAME_IS_INVALID--}');
} // END - if
// Load Template