Page 1 of 1

Bug 5.75: hook _global login_ok can not use absolute URL

Posted: 2019-06-13 08:10
by onoehring
Hi,

for tests I tried

Code: Select all

function login_ok($memberInfo, &$args){
return 'https://google.com';
}
All users should be redirected to google ... but - opposite to the explanation in the comments of that function an error occurs:
The requested URL /https://google.com was not found on this server.
Olaf

Re: Bug 5.75: hook _global login_ok can not use absolute URL

Posted: 2019-06-13 08:35
by pbottcher
Hi,

the $args feature seems not to be implemented in the login_ok check.

If you need this feature you can call

redirect('https://www.google.com',true);

directly instead of passing the url in the return

Re: Bug 5.75: hook _global login_ok can not use absolute URL

Posted: 2019-06-13 09:30
by onoehring
Hi,

I think the error was actualls
/https:/google.com
after the https: was only a single / if I rememeber correct. So strange things going on here.
Rhetorical question: Why not simply redirect to whatever is received?

Olaf