Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

Destroy User Info

posted by jmtucu 8 years ago

Hi again!

I've a method called logout() with

    public function logout()
    {
      fAuthorization::destroyUserInfo();
      fMessaging::create('success', URL_ROOT . 'student/login', 'Session closed.');
      fURL::redirect(
        URL_ROOT . 'student/login'
        );
    }

But it seem doesn't work, if I call fAuthorization::checkLoggedIn() it give me true =/

In the login I'm using only this

fAuthorization::setUserAuthLevel($type);
fSession::enablePersistence();

I don't know why I can't destroy the user session...

Any idea?

Thanks!

When you hit the login page, are you running those two lines of code? If so, it is logging you in again. I imagine you are probably running those only once a user has provided a valid login and password.

Sometimes these types of issues happen when you change your session cookie parameters. For instance, if you just started using fSession::ignoreSubdomain(), then your old session cookie is set to a different domain than the cookie is now trying to use. When this happens I often have to clear my cookies and try logging in fresh.

posted by wbond 8 years ago

Yes, I'm running those lines only when the login it's valid.

The problem was the cookie, I dont know why but after delete manually it works like a charm :)

Thanks will!

posted by jmtucu 8 years ago