Juser plugin

arie

Member
Hi, I've got a Juser plugin on a form.
When i update the email, it seems he isn't updated after having saved the change.

I need to logout and login again in order to see the change. It seems the session isn't refreshed!

I found this workaround in order to refresh the session but i don't know if it's a good practice
Code:
$user = JFactory::getUser();
$session = JFactory::getSession();
$session->set('user', new JUser($user->id));

thks
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top