]> git.mxchange.org Git - mailer.git/blobdiff - modules.php
Determination of username moved to filter FILTER_DETERMINE_USERNAME() (internal TODO)
[mailer.git] / modules.php
index dcc22657d4362df9c61d6d8832b4d415d8027e6e..0d26db9cf0367e5f4f55f78e8f9dc4b55c09443e 100644 (file)
@@ -55,42 +55,6 @@ require('inc/config-global.php');
 // Fix missing module to 'index'
 if (!REQUEST_ISSET_GET('module')) REQUEST_SET_GET('module', 'index');
 
-// Check if logged in
-if (IS_MEMBER()) {
-       // Is still logged in so we welcome him with his name
-       $result = SQL_QUERY_ESC("SELECT `surname`, `family` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1",
-               array(getUserId()), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 1) {
-               // Load surname and family's name and build the username
-               list($s, $f) = SQL_FETCHROW($result);
-               $username = $s . ' ' . $f;
-
-               // Additionally admin?
-               if (IS_ADMIN()) {
-                       // Add it
-                       $username .= ' ({--_ADMIN_SHORT--})';
-               } // END - if
-       } else {
-               // Hmmm, logged in and no valid userid?
-               $username = '<em>{--_UNKNOWN--}</em>';
-
-               // Destroy session
-               destroyUserSession();
-
-               // Kill userid
-               setUserId(0);
-       }
-
-       // Free memory
-       SQL_FREERESULT($result);
-} elseif (IS_ADMIN()) {
-       // Admin is there
-       $username = getMessage('_ADMIN');
-} else {
-       // He's a guest, hello there... ;-)
-       $username = getMessage('_GUEST');
-}
-
 // The header file
 loadIncludeOnce('inc/header.php');