Deprecated: Assigning the return value of new by reference is deprecated in /home/bluestat/public_html/source/index.php on line 477
Bugdar - Commitdiff - ViewGit - Blue Static

Fix an issue where after creating a Bugdar user in _fetchBugdarUserFromAuthUser() the returned array would be incomplete

Robert Sesek [2009-02-14 18:37]
Fix an issue where after creating a Bugdar user in _fetchBugdarUserFromAuthUser() the returned array would be incomplete

* includes/auth/auth.php:
(Authentication::_fetchBugdarUserFromAuthUser): If we call _createBugdarUser() don't return the result of that, but call _fetchBugdarUserFromAuthUser again
diff --git a/includes/auth/auth.php b/includes/auth/auth.php
index f7e129f..a253228 100644
--- a/includes/auth/auth.php
+++ b/includes/auth/auth.php
@@ -249,7 +249,8 @@ class Authentication
 		$user = $this->db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "user WHERE authid = '" . $this->authUser[ $this->fieldMap['authid'] ] . "'");
 		if (!$user)
 		{
-			return $this->_createBugdarUser();
+			$this->_createBugdarUser();
+			return $this->_fetchBugdarUserFromAuthUser();
 		}
 		return $user;
 	}