[Joomla] Check If user logged in

Just realize there this $my variable that conveniently lets you access the user id of a (logged in) user on the site.

if ($my->id) {
  // Do something here
}

Not something fantastic. I just realize this. :p

Comments

Popular posts from this blog

[Azure Websites PHP] Cross Domain request results in blank response page after Preflight HTTP OPTIONS

[Magento] Create Contact Form with Dynamic Recipient