]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/user_functions.php
Re-added, now the right ones
[mailer.git] / inc / libs / user_functions.php
index 37bd1941e3f44958a0e29d0f88b537be124c709a..8da502bc7833d121df0a5b0c954bd028cd25d498 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Spezielle Funktionen fuer die user-Erweiterung   *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision:: 856                                                    $ *
+ * $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                  *
@@ -328,7 +333,7 @@ function USER_DO_LOGIN ($uid, $passwd) {
 
                        // Update global array
                        // @TODO Make this filter working: $URL = runFilterChain('do_login', array('uid' => $uid, 'hash' => $hash, 'addon' => $ADDON));
-                       $GLOBALS['userid'] = $uid;
+                       setUserId($uid);
 
                        // Try to set session data (which shall normally always work!)
                        if ((set_session('userid', $uid )) && (set_session('u_hash', $hash))) {
@@ -346,11 +351,11 @@ function USER_DO_LOGIN ($uid, $passwd) {
                                        }
                                } else {
                                        // Cannot update counter!
-                                       $URL = "modules.php?module=index&what=login&login=".constant('CODE_CNTR_FAILED');
+                                       $URL = "modules.php?module=index&what=login&login=".getCode('CNTR_FAILED');
                                }
                        } else {
                                // Cookies not setable!
-                               $URL = "modules.php?module=index&what=login&login=".constant('CODE_NO_COOKIES');
+                               $URL = "modules.php?module=index&what=login&login=".getCode('NO_COOKIES');
                        }
                } elseif (GET_EXT_VERSION("sql_patches") >= "0.6.1") {
                        // Update failture counter
@@ -358,7 +363,7 @@ function USER_DO_LOGIN ($uid, $passwd) {
                                array($uid), __FUNCTION__, __LINE__);
 
                        // Wrong password!
-                       $URL = "modules.php?module=index&what=login&login=".constant('CODE_WRONG_PASS');
+                       $URL = "modules.php?module=index&what=login&login=".getCode('WRONG_PASS');
                }
        } elseif ((($probe_nickname) && (!empty($uid2))) || ($uid2 == $uid)) {
                // Other account status?
@@ -375,14 +380,14 @@ function USER_DO_LOGIN ($uid, $passwd) {
                        $ERROR = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status);
                } else {
                        // ID not found!
-                       $ERROR = constant('CODE_WRONG_ID');
+                       $ERROR = getCode('WRONG_ID');
                }
 
                // Construct URL
                $URL = "modules.php?module=index&what=login&login=".$ERROR;
        } else {
                // ID not found!
-               $URL = "modules.php?module=index&what=login&login=".constant('CODE_WRONG_ID');
+               $URL = "modules.php?module=index&what=login&login=".getCode('WRONG_ID');
        }
 
        // Return URL
@@ -414,7 +419,7 @@ function USER_DO_NEW_PASSWORD ($email, $uid) {
        } else {
                // Userid not set!
                DEBUG_LOG(__FUNCTION__, __LINE__, "Userid is not set! BUG!");
-               $ERROR = constant('CODE_WRONG_ID');
+               $ERROR = getCode('WRONG_ID');
        }
 
        // Any entry found?