I have a site built within Joomla. The standard login is able to be triggered by a link and displayed in a lightbox but as far as I can tell, the lightbox trigger only works when clicking the link. I'm trying to find a way to simulate the clicking of this link but I need to do it only after determining if the user is logged in which is done by calling a Joomla user function. So in a nutshell, here is an example of the code:
Code: Select all
if ($user->guest) {
EXECUTE SOMETHING HERE TO "CLICK" A LINK TO ACTIVATE THE LIGHTBOX LOGIN
}
Code: Select all
<?php JHTML::_('behavior.modal'); ?>
<a class="modal" href="index.php?option=com_user&view=login&tmpl=component">login</a>