What is the best (fastest/safest/better for the long run) way to check if a member is signed in Joomla.
1# way: $user =& JFactory::getUser();
if($user->id!=0){
2# way: $user =JFactory::getUser()->guest;
or another way?
These are snippets out of a custom script to check if a user is a guest to tell him to signup and if he signed in to welcome him.
I am using Joomla 2.5
I have read on Joomla 2.5 check user logged in that some codes are different depending on the php version I am using? I am puzzled.
Thanks