create-prisma-php-app 4.3.3 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -219,15 +219,15 @@ class Auth
|
|
|
219
219
|
* Refreshes the current user's session if the provided User ID matches the currently authenticated user.
|
|
220
220
|
* This allows silent updates of permissions or profile data without requiring a logout.
|
|
221
221
|
* @param string $targetUserId The ID of the user being updated.
|
|
222
|
-
* @param mixed $
|
|
222
|
+
* @param mixed $newUserData The fresh user object (e.g. from Prisma) to replace the session payload.
|
|
223
223
|
* @return bool Returns true if the session was updated, false if the IDs did not match or no session exists.
|
|
224
224
|
*/
|
|
225
|
-
public function refreshUserSession(string $targetUserId, mixed $
|
|
225
|
+
public function refreshUserSession(string $targetUserId, mixed $newUserData): bool
|
|
226
226
|
{
|
|
227
227
|
$currentUser = $this->getPayload();
|
|
228
228
|
|
|
229
229
|
if ($currentUser && isset($currentUser->id) && $currentUser->id === $targetUserId) {
|
|
230
|
-
$this->signIn($
|
|
230
|
+
$this->signIn($newUserData, null, false);
|
|
231
231
|
return true;
|
|
232
232
|
}
|
|
233
233
|
|