aboutsummaryrefslogtreecommitdiffstats
path: root/include/auth.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/auth.php')
-rw-r--r--include/auth.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/auth.php b/include/auth.php
index a4e859e0c..425715014 100644
--- a/include/auth.php
+++ b/include/auth.php
@@ -233,10 +233,10 @@ else {
function match_openid($authid) {
- $r = q("select * from pconfig where cat = 'system' and k = 'openid' ");
+ $r = q("select * from pconfig where cat = 'system' and k = 'openid' and v = '%s' limit 1",
+ dbesc($authid)
+ );
if($r)
- foreach($r as $rr)
- if($rr['v'] === $authid)
- return $rr['uid'];
+ return $r[0]['uid'];
return false;
}