Check if user is logged in in Joomla 1.5.x

Use the code below to check if a user is logged in. This is useful if you want to only show certain parts of your component to registered users and not non-registred users. Have fun.

    $user =& JFactory::getUser();
        //do user logged in stuff
        //do user not logged in stuff
  • Share post

A collection of particles named Tali Luvhengo


Leave a Reply to Mirza Cancel reply

Your email address will not be published. Required fields are marked *

Page optimized by WP Minify WordPress Plugin