]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OpenID/User_openid.php
Logic to have group joins turn into pending joins automatically when group is set...
[quix0rs-gnu-social.git] / plugins / OpenID / User_openid.php
index 801b49eccdcd612b24a891cd4ca2392e7dcfc961..e34cf21f2cd142db5015c81d6d77a74e3b1e2d6a 100644 (file)
@@ -2,7 +2,10 @@
 /**
  * Table Definition for user_openid
  */
-require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
+
+if (!defined('STATUSNET')) {
+    exit(1);
+}
 
 class User_openid extends Memcached_DataObject
 {
@@ -39,9 +42,26 @@ class User_openid extends Memcached_DataObject
                      );
     }
 
+    /**
+     * List primary and unique keys in this table.
+     * Unique keys used for lookup *MUST* be listed to ensure proper caching.
+     */
     function keys()
     {
-        return array('canonical' => 'K', 'display' => 'U');
+        return array_keys($this->keyTypes());
+    }
+
+    function keyTypes()
+    {
+        return array('canonical' => 'K', 'display' => 'U', 'user_id' => 'U');
+    }
+
+    /**
+     * No sequence keys in this table.
+     */
+    function sequenceKey()
+    {
+        return array(false, false, false);
     }
 
     Static function hasOpenID($user_id)