* -------------------------------------------------------------------- *
* Kurzbeschreibung : Nickname anstelle der ID *
* -------------------------------------------------------------------- *
- * *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
// Add description as navigation point
ADD_DESCR("member", __FILE__);
-$VALID = false;
+$isValid = false;
if (IS_FORM_SENT()) {
// Nickname was submitted so let's check if it is not already in use
$PATTERN = "[".getConfig('nickname_pattern')."]{".getConfig('nickname_length').",}";
if (ereg($PATTERN, REQUEST_POST('nickname'), $array)) {
// Entered nickname is valid?
- if ($array[0] == REQUEST_POST('nickname')) $VALID = true;
+ if ($array[0] == REQUEST_POST('nickname')) $isValid = true;
} // END - if
} // END - if
} // END - if
-if ($VALID) {
+if ($isValid === true) {
// 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(REQUEST_POST('nickname'), $GLOBALS['userid']), __FILE__, __LINE__);
+ array(REQUEST_POST('nickname'), getUserId()), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// 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(REQUEST_POST('nickname'), $GLOBALS['userid']), __FILE__, __LINE__);
- $content = NICKNAME_SAVED;
+ array(REQUEST_POST('nickname'), getUserId()), __FILE__, __LINE__);
+ $content = getMessage('NICKNAME_SAVED');
} else {
// Free result
SQL_FREERESULT($result);
// Nickname already in use!
- $content = NICKNAME_ALREADY_IN_USE;
+ $content = getMessage('NICKNAME_ALREADY_IN_USE');
}
// Load template
LOAD_TEMPLATE("admin_settings_saved", false, $content);
} else {
// Load current nickname
- define('__NICKNAME', NICKNAME_GET_NICK($GLOBALS['userid']));
+ define('__NICKNAME', NICKNAME_GET_NICK(getUserId()));
// Do we have already submit the form?
if (REQUEST_ISSET_POST(('nickname'))) {