aboutsummaryrefslogtreecommitdiffstats
path: root/mod/authtest.php
diff options
context:
space:
mode:
authorPaolo T <tuscanhobbit@users.noreply.github.com>2014-02-25 16:33:40 +0100
committerPaolo T <tuscanhobbit@users.noreply.github.com>2014-02-25 16:33:40 +0100
commit0a98f6b878ec89be7282621192d9daf80f125e6c (patch)
tree718a4771ce1fb86931531226898b0b5d00e4a337 /mod/authtest.php
parent34d30e4d7eb48bd801482531a0d775328bd43ab4 (diff)
parentb1021df485fb6129acda5bba616bac10aea75a45 (diff)
downloadvolse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.tar.gz
volse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.tar.bz2
volse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.zip
Merge pull request #1 from friendica/master
Update this fork
Diffstat (limited to 'mod/authtest.php')
-rw-r--r--mod/authtest.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/mod/authtest.php b/mod/authtest.php
index 2c8d7b4b4..3044a880b 100644
--- a/mod/authtest.php
+++ b/mod/authtest.php
@@ -6,7 +6,7 @@ require_once('mod/magic.php');
function authtest_content(&$a) {
-
+ $auth_success = false;
$o .= '<h3>Magic-Auth Diagnostic</h3>';
if(! local_user()) {
@@ -34,11 +34,16 @@ function authtest_content(&$a) {
if(! $j)
$o .= 'json_decode failure from remote site. ' . print_r($z['body'],true);
$o .= 'Remote site responded: ' . print_r($j,true);
+ if($j['success'] && strpos($j['message'],'Authentication Success'))
+ $auth_success = true;
}
else {
$o .= 'fetch url failure.' . print_r($z,true);
}
}
+
+ if(! $auth_success)
+ $o .= 'Authentication Failed!' . EOL;
}
return str_replace("\n",'<br />',$o);