Welcome Guest, Not a member yet? Register   Sign In
Auth/myth - before filter - redirect login
#1

(This post was last modified: 08-03-2020, 08:34 AM by jreklund.)

Hi,
I seem to be getting stuck in an infinite loop trying to redirect to the myth:auth login page.  I have set up a filter, below. 

In my browser if I navigate to http://mydomain/login the login page is shown, as expected.

But if i navigate to http://mydomain/   i get caught in an infinite loop?

I do not have any routes configured for login, or anything remotely like it.

Can anyone point me in the right direction (excuse the pun)?

PHP Code:
public function before(RequestInterface $request) {    
        if(
logged_in()!=true && uri_string()!='login') {        
                return 
redirect('login');
        }
            
    
Reply


Messages In This Thread
Auth/myth - before filter - redirect login - by 68thorby68 - 08-03-2020, 08:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB