aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/account.php9
-rw-r--r--include/auth.php8
2 files changed, 10 insertions, 7 deletions
diff --git a/include/account.php b/include/account.php
index 242e6512f..1206223d9 100644
--- a/include/account.php
+++ b/include/account.php
@@ -440,7 +440,8 @@ function downgrade_accounts() {
dbesc('0000-00-00 00:00:00'),
intval($rr['account_id'])
);
- call_hooks('account_downgrade', array('account' => $rr));
+ $ret = array('account' => $rr);
+ call_hooks('account_downgrade', $ret );
logger('downgrade_accounts: Account id ' . $rr['account_id'] . ' downgraded.');
}
else {
@@ -448,8 +449,10 @@ function downgrade_accounts() {
intval(ACCOUNT_EXPIRED),
intval($rr['account_id'])
);
- call_hooks('account_downgrade', array('account' => $rr));
+ $ret = array('account' => $rr);
+ call_hooks('account_downgrade', $ret);
logger('downgrade_accounts: Account id ' . $rr['account_id'] . ' expired.');
}
}
-} \ No newline at end of file
+}
+
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;
}