aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/auth.php10
-rwxr-xr-xinclude/text.php4
2 files changed, 14 insertions, 0 deletions
diff --git a/include/auth.php b/include/auth.php
index 2b7c385fd..a4e859e0c 100644
--- a/include/auth.php
+++ b/include/auth.php
@@ -230,3 +230,13 @@ else {
authenticate_success($record, true, true);
}
}
+
+
+function match_openid($authid) {
+ $r = q("select * from pconfig where cat = 'system' and k = 'openid' ");
+ if($r)
+ foreach($r as $rr)
+ if($rr['v'] === $authid)
+ return $rr['uid'];
+ return false;
+}
diff --git a/include/text.php b/include/text.php
index 2f5accf6e..2bf760035 100755
--- a/include/text.php
+++ b/include/text.php
@@ -1924,3 +1924,7 @@ function in_arrayi($needle, $haystack) {
return in_array(strtolower($needle), array_map('strtolower', $haystack));
}
+function normalise_openid($s) {
+ return trim(str_replace(array('http://','https://'),array('',''),$s),'/');
+}
+