Fix redirects

pull/7425/head
Thomas Bruederli 4 years ago
parent 06af3b5ef5
commit dd9b5c0ee6

@ -467,7 +467,12 @@ class rcmail_oauth
*/
public function unauthenticated($options)
{
if ($this->options['login_redirect'] && !$this->no_redirect && empty($options['error'] && $options['http_code'] === 200)) {
if ($this->options['login_redirect'] &&
!$this->rcmail->output->ajax_call &&
!$this->no_redirect &&
empty($options['error']) &&
$options['http_code'] === 200
) {
$this->login_redirect();
}

@ -52,7 +52,8 @@ if (!empty($auth_code)) {
unset($redir['abort'], $redir['_err']);
// send redirect
$OUTPUT->redirect($redir, 0, true);
header('Location: ' . $rcmail->url($redir, true, false, $secure));
exit;
} else {
$OUTPUT->show_message('loginfailed', 'warning');

Loading…
Cancel
Save