How can I make a PHP script that displays a users Registered Date and Last Visited Date as it appears in the core Joomla profile page?
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.Sign up to join this community
Before asking a question like this, please do some research. Seeing as you have been doing a lot of work with the user Object already, I'm surprised you haven't seen the following page yet:
You can simply use:
$user = JFactory::getUser(); echo '<p>Register date: ' . $user->registerDate . '</p>'; echo '<p>Last visited: ' . $user->lastvisitDate . '</p>';