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.

This commit is contained in:
friendica
2014-02-17 19:48:05 -08:00
parent 7fc292831c
commit d6ab975b18
4 changed files with 125 additions and 2 deletions

View File

@@ -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);