Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helper. Bug at logged_in function #204

Closed
dfs-ka opened this issue Apr 23, 2020 · 1 comment
Closed

Helper. Bug at logged_in function #204

dfs-ka opened this issue Apr 23, 2020 · 1 comment

Comments

@dfs-ka
Copy link

dfs-ka commented Apr 23, 2020

Hi!

The system unlogin me after ~3 hours, so I can't see the site. But if I go to the login page, it's logging me automatically without asking my login/password.

As I understand, the problem in logged_in(). It works incorrectly if you use "remember me".

See the AuthController: login() checks "$this->auth->check()", but logged_in() checks only "Services::authentication()->isLoggedIn()".

public function check(): bool { if ($this->isLoggedIn()) { return true; } ... more actions ... }

One of this "more actions" is checking "remember me" functionality.

So I've changed logged_in() function from
return Services::authentication()->isLoggedIn();

to
Services::authentication()->check()

Works ok now!

@agungsugiarto
Copy link
Contributor

Reference #174

lonnieezell added a commit that referenced this issue May 5, 2020
Switch to using check method in logged_in. Fixes #204
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants