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

Logout fails for deleted user #236

Closed
navindex opened this issue Jun 6, 2020 · 2 comments
Closed

Logout fails for deleted user #236

navindex opened this issue Jun 6, 2020 · 2 comments

Comments

@navindex
Copy link

navindex commented Jun 6, 2020

Let's say I'm logged in and I want to delete my own user record. If I call the logout() after the record was deleted, it fails here (AuthenticationBase.php line 188):
$this->loginModel->purgeRememberTokens($user->id);
because $user is NULL.
However, if I would call the logout before deleting the record, it is possible that the delete process fails (for whatever reason) and I was logged out unnecessarily.
It would be nice to use the logout without 500 error when the user doesn't exist or not logged in - just to clean up the cookies.

@MGatner
Copy link
Collaborator

MGatner commented Jun 12, 2020

This was fixed by #238, which makes logout() a repeatable function regardless of current state.

@navindex
Copy link
Author

Excellent, thank you.

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