Skip to content

Add refreshUser() method to SessionAuthAdapter #329

@armanist

Description

@armanist

Description:
Currently, the SessionAuthAdapter does not have a refreshUser() method like the JwtAuthAdapter. This results in web controllers needing to manually merge updated user data into the session.

Changes:
Added refreshUser(string $uuid): bool to SessionAuthAdapter.

  • Safely updates session data with database changes without overwriting other session fields.
  • Simplifies controller logic: controllers can now call auth()->refreshUser($uuid) instead of manually merging fields.
  • Added unit test testWebRefreshUser() to verify session and user object are correctly updated.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions