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

Added method User::refresh() to clear identity cache. (#46) #50

Merged
merged 2 commits into from Dec 31, 2020

Conversation

Sikipiki
Copy link
Contributor

@Sikipiki Sikipiki commented Jul 2, 2020

Example in BasePresenter.php:

public function startup()
{
	$this->getUser()->getStorage()->setNamespace('namespace_1');
	.
	.
	.
	$this->getUser()->refresh()->getStorage()->setNamespace('namespace_2');
}

@Sikipiki
Copy link
Contributor Author

After use, I found a problem with refresh(): each time the page loads, the session_id changes. This is caused by calling $this->storage->getIdentity() in method getIdentity() in Nette\Security\User.php.

Fix - clear $this->authenticated
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

Successfully merging this pull request may close these issues.

None yet

2 participants