Check login status of user in joomla
by Joseph on the 30th Jun 2016
Use the following script to check if the user is logged into or logged out of Joomla
<?php
if(JFactory::getUser()->guest) {
//do user logged out stuff
echo 'Login';
}
else {
//do user logged in stuff
echo 'Logout';
}
?>