Jump to content

Recommended Posts

Posted

At the top of each of my main pages, I want to redirect to my login page if the session is timed out.  How can I use the PW API to test for this?

$user->isLoggedin() doesn't seem to do it, like I expected.

THX

Posted

I think using $user->isLoggedin() should work fine.

if(!$user->isLoggedin()) {
    $session->redirect('/some-url/');
}

In what way is it not working like you expect?

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...