r1434: Implement Authentication::_fetchBugdarUserFromAuthUser() ourselves now that...
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 11 Mar 2007 05:37:32 +0000 (05:37 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 11 Mar 2007 05:37:32 +0000 (05:37 +0000)
includes/auth/auth.php

index ea1d3edc1fb3adee7d4933c693621887dd54b7dc..566393f3237b09cc934050c29282c0610e7ab0da 100644 (file)
@@ -232,7 +232,15 @@ class Authentication
        * can be saved in the Bugdar database (and not in the auth one), however
        * authentication details will NOT be stored in the Bugdar database.
        */
-       function _fetchBugdarUserFromAuthUser() {}
+       function _fetchBugdarUserFromAuthUser()
+       {
+               $user = $this->db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE authid = '" . $this->authUser[ $this->fieldMap['authid'] ] . "'");
+               if (!$user)
+               {
+                       return $this->_createBugdarUser();
+               }
+               return $user;
+       }
        
        // ###################################################################
        /**