diff options
author | friendica <info@friendica.com> | 2014-02-17 19:48:05 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-02-17 19:48:05 -0800 |
commit | d6ab975b188778a0be936c3065b502e0c58b8c91 (patch) | |
tree | 8a66ae676e7637ad5335e3ec1fd47a55dca0bfcb /mod/rmagic.php | |
parent | 7fc292831cfc86cf818c3fb71596ef8acb01f689 (diff) | |
download | volse-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 'mod/rmagic.php')
-rw-r--r-- | mod/rmagic.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mod/rmagic.php b/mod/rmagic.php index 093ccd328..946277327 100644 --- a/mod/rmagic.php +++ b/mod/rmagic.php @@ -23,12 +23,20 @@ function rmagic_init(&$a) { function rmagic_post(&$a) { $address = trim($_REQUEST['address']); - $other = intval($_REQUEST['other']); - if($other) { + if(strpos($address,'@') === false) { $arr = array('address' => $address); call_hooks('reverse_magic_auth', $arr); + try { + require_once('library/openid/openid.php'); + $openid = new LightOpenID(z_root()); + $openid->identity = $address; + $openid->returnUrl = z_root() . '/openid'; + goaway($openid->authUrl()); + } catch (Exception $e) { + notice( t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.').'<br /><br >'. t('The error message was:').' '.$e->getMessage()); + } // if they're still here... notice( t('Authentication failed.') . EOL); |