You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After using $session->forceLogin($loginUser) the $user variable does not get updated before the page reload. But wire('user') function returns what is needed. It seems a little inconsistent. Is it supposed to be that way, or is it a bug?
The text was updated successfully, but these errors were encountered:
Local variables cannot be updated. They are declared like you would do it for your variables before the template files are included. They then refer to the object assigned to it. wire() on the other hand is a function, which does lookup the current user object each time it's called. One could create a wrapper object to assign to $user, which does the same, but that's probably not worth the effort for such a small usecase. It's probably best to redirect after forceLogin anyways.
After using $session->forceLogin($loginUser) the $user variable does not get updated before the page reload. But wire('user') function returns what is needed. It seems a little inconsistent. Is it supposed to be that way, or is it a bug?
The text was updated successfully, but these errors were encountered: