The code below allows me to display the username on the Joomla user profile profile page. Given that I redefined the template to get the look I want.
$user =& JFactory::getUser(); if (!$user->guest) { echo 'You are logged in as:<br />'; echo 'Real name: ' . $user->name . ''; }
My problem is that I allow the user to update their profile. After it updates its name, the database is updated correctly, but the updated name is not displayed on the profile page.
When I view Joomla documents, I find out that user data is stored in a session (JFactory :: getUser ()). If I print_r($_SESSION) , I can see the user data object. Also, if I log out, then log back in. The updated name is displayed on the profile page.
How to show update data on profile page after updating data? Is there a way to update session data in a Joomla session, rather than manually doing this?
source share