}
$url = $_GET['url'] ?? '';
- $quiet = !empty($_GET['quiet']) ? '&quiet=1' : '';
- if ($a->argc > 1 && intval($a->argv[1])) {
- $cid = intval($a->argv[1]);
+ if (DI::args()->getArgc() > 1 && intval(DI::args()->getArgv()[1])) {
+ $cid = intval(DI::args()->getArgv()[1]);
} else {
$cid = 0;
}
$contact_url = $contact['url'];
- if (!empty($a->contact_id) && $a->contact_id == $cid) {
+ if (!empty($a->getContactId()) && $a->getContactId() == $cid) {
// Local user is already authenticated.
redir_check_url($contact_url, $url);
$a->redirect($url ?: $contact_url);
$cid = $contact['id'];
}
- if (!empty($a->contact_id) && $a->contact_id == $cid) {
+ if (!empty($a->getContactId()) && $a->getContactId() == $cid) {
// Local user is already authenticated.
redir_check_url($contact_url, $url);
$target_url = $url ?: $contact_url;
- Logger::log($contact['name'] . " is already authenticated. Redirecting to " . $target_url, Logger::DEBUG);
+ Logger::info($contact['name'] . " is already authenticated. Redirecting to " . $target_url);
$a->redirect($target_url);
}
}
// Remote user is already authenticated.
redir_check_url($contact_url, $url);
$target_url = $url ?: $contact_url;
- Logger::log($contact['name'] . " is already authenticated. Redirecting to " . $target_url, Logger::DEBUG);
+ Logger::info($contact['name'] . " is already authenticated. Redirecting to " . $target_url);
$a->redirect($target_url);
}
}
$url .= $separator . 'zrl=' . urlencode($my_profile);
}
- Logger::log('redirecting to ' . $url, Logger::DEBUG);
+ Logger::info('redirecting to ' . $url);
$a->redirect($url);
}
}
// Test for magic auth on the target system
- $serverret = DI::httpRequest()->get($basepath . '/magic');
+ $serverret = DI::httpClient()->get($basepath . '/magic');
if ($serverret->isSuccess()) {
$separator = strpos($target_url, '?') ? '&' : '?';
$target_url .= $separator . 'zrl=' . urlencode($visitor) . '&addr=' . urlencode($contact_url);