aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-17 19:48:05 -0800
committerfriendica <info@friendica.com>2014-02-17 19:48:05 -0800
commitd6ab975b188778a0be936c3065b502e0c58b8c91 (patch)
tree8a66ae676e7637ad5335e3ec1fd47a55dca0bfcb /include
parent7fc292831cfc86cf818c3fb71596ef8acb01f689 (diff)
downloadvolse-hubzilla-d6ab975b188778a0be936c3065b502e0c58b8c91.tar.gz
volse-hubzilla-d6ab975b188778a0be936c3065b502e0c58b8c91.tar.bz2
volse-hubzilla-d6ab975b188778a0be936c3065b502e0c58b8c91.zip
operation snakebite continued. openid now works for local accounts using the rmagic module and after storing your openid in pconfig. This is just an interesting but trivial (in the bigger scheme of things) side effect of snakebite. The snake hasn't even waken up yet.
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),'/');
+}
+