From 1c6f1e3a075bb30911a3ac6cf6f90c9125261ec5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 4 Nov 2009 09:19:46 +0000 Subject: [PATCH] Fixes for login --- inc/mysql-manager.php | 3 +++ inc/wrapper-functions.php | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 9c0e40109c..e379a695a5 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -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 diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 9d61c0cf94..26187489f3 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -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']; } -- 2.30.2