solved Keeping $_user Timely

TiG
TiG
@tig
7 years ago
184 posts
This relates to SimpleChat but it is a question in general. What (if any) is the recommended method for refreshing $_user to reflect recent changes? Imagine, as with SimpleChat, a user changes a setting. The setting change is immediately persisted but $_user is not updated until (it seems) the user logs out / in.

Is there a function designed to update $_user after user properties are changed?


--
TiG

updated by @tig: 12/11/17 04:30:21PM
michael
@michael
7 years ago
7,750 posts
That would be:
jrUser_session_sync($_user['_user_id']);
"Refresh an existing user session with the latest User and Profile info"
TiG
TiG
@tig
7 years ago
184 posts
@michael - inserted line is working like a charm. Beautiful. Thanks.


--
TiG
michael
@michael
7 years ago
7,750 posts
:)

Tags