Status codes rewritten to GLOBALS
[mailer.git] / inc / libs / user_functions.php
index 84717f3809b8ad7e9ab27502a5baf42f221de2f2..95200502da5d21970edc5bd03620e751d44b7208 100644 (file)
@@ -351,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
@@ -363,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?
@@ -380,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
@@ -419,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?