From: Brion Vibber Date: Fri, 5 Mar 2010 23:00:27 +0000 (-0800) Subject: OpenID fix: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5355c3b7b579f803bb18913db3b4d9cf380f17ac;p=quix0rs-gnu-social.git OpenID fix: - avoid notice on insert (missing sequenceKeys()) - avoid cache corruption on delete (user_id was missing from keys list, cache not cleared for user_id lookups) --- diff --git a/plugins/OpenID/User_openid.php b/plugins/OpenID/User_openid.php index 801b49eccd..5ef05b4c77 100644 --- a/plugins/OpenID/User_openid.php +++ b/plugins/OpenID/User_openid.php @@ -39,9 +39,21 @@ 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('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)