Fixes for login
authorRoland Häder <roland@mxchange.org>
Wed, 4 Nov 2009 09:19:46 +0000 (09:19 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 4 Nov 2009 09:19:46 +0000 (09:19 +0000)
inc/mysql-manager.php
inc/wrapper-functions.php

index 9c0e40109c51376d3086e06529441b1641349167..e379a695a50ff1fa0d5c41a3f935a62627aa26d0 100644 (file)
@@ -634,6 +634,9 @@ function isMember () {
 
 // Fetch user data for given user id
 function fetchUserData ($userid, $column='userid') {
+       // Set it here
+       setCurrentUserId($userid);
+
        // Don't look for invalid userids...
        if ($userid < 1) {
                // Invalid, so abort here
index 9d61c0cf94b87eff600170d7aa895944e83ddc34..26187489f3450b0c4264429c305456d912a4af33 100644 (file)
@@ -752,6 +752,10 @@ function setCurrentUserId ($userid) {
 
 // Getter for current userid
 function getCurrentUserId () {
+       // Return zero if not set
+       if (!isset($GLOBALS['current_userid'])) return 0;
+
+       // Return the userid
        return $GLOBALS['current_userid'];
 }