Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

m4riachi's avatar

[5.7.11] Auth and session data

Hi every one

I got session data from other user connected

1- i connect with pseudo "TOTO"

2- {{ auth()->user()->name }} -- i get "TOTO"

3- an other user connect from an other machine with "FOFO"

4- {{ auth()->user()->name }} -- i get "FOFO" on my machine

any help plz

0 likes
5 replies
tomopongrac's avatar

I dont understand the problem because auth()->user() gets the user which is authenticated

tomopongrac's avatar

if on other machine FOFO user is authenticated you get his data, if you authenicate with TOTO credetials you will get his data

m4riachi's avatar

Any help plz, i dont know why auth()->user() take on other session user data

Please or to participate in this conversation.