Add the possibility for globally whitelisted websites
authorAymeric Augustin <aymeric.augustin@m4x.org>
Fri, 31 Oct 2008 22:32:29 +0000 (23:32 +0100)
committerAymeric Augustin <aymeric.augustin@m4x.org>
Fri, 31 Oct 2008 22:32:29 +0000 (23:32 +0100)
(TODO admin interface to handle them)

modules/openid/openid.inc.php

index 5203c44..6a749ab 100644 (file)
@@ -113,7 +113,7 @@ function is_trusted_site($user, $url)
 {
     $res = XDB::query('SELECT  COUNT(*)
                          FROM  openid_trusted
-                        WHERE  user_id = {?}
+                        WHERE  (user_id = {?} OR user_id IS NULL)
                           AND  url = {?}',
                                $user->id(), $url);
     return $res->fetchOneCell() > 0;