]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-nickname.php
'userid' rewritten to functions
[mailer.git] / inc / modules / member / what-nickname.php
index 2a4c2edc9156b0e8328e65fb4e06772921fbca19..e606f04eae14008d0c65a3923b7d6c5a39fff439 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Nickname anstelle der ID                         *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision:: 856                                                    $ *
+ * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009)              $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author:: stelzi                                                   $ *
+ * 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                  *
@@ -61,25 +66,25 @@ if (IS_FORM_SENT()) {
 if ($VALID) {
        // 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__);
+                       array(REQUEST_POST('nickname'), getUserId()), __FILE__, __LINE__);
                $content = 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'))) {