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

Add hint about user object cached in the sessions #775

Merged
merged 4 commits into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cookbook/extend-entities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ For the `User` entity (`se_users`):
model: App\Entity\User
repository: Sulu\Bundle\SecurityBundle\Entity\UserRepository

.. note::

Symfony keeps the user object in the session, clearing the sessions is so sometimes required
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a link to the symfony command how to clear the sessions

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wachterjohannes dont know any command which clears the sessions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how have you done it then in the project we had that problem?

Copy link
Member Author

@alexander-schranz alexander-schranz Jul 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete the session files manual they are stored differently based on the OS

when running into ``php.CRITICAL: Uncaught Error: Failed opening required /var/project/var/cache/website/prod/doctrine/orm/Proxies/__CG__SuluBundleSecurityBundleEntityUser.php``.
If use the native session storage you can use ``(php -i && php bin/console debug:config framework session) | grep save_path`` to get the configured save paths of sessions.

For the `Role` entity (`se_roles`):

.. code-block:: yaml
Expand Down
Loading