Joomla make custom Module for LOGIN in POPUP window

No comments
//Just copy and paste this code in default.php of your module.

<?php

defined('_JEXEC') or die;
JHTML::_('behavior.modal');


$user = JFactory::getUser(); //get user credentials

?>

<div class="btl-panel">
   <?php if($user->guest){?>
          <a class="modal login-popup" href="index.php?option=com_users&view=login&tmpl=component" rel="{ size: {x: 480, y: 340}}" >Login</a>
    <?php }else{ ?>
         <a  class="" href="index.php?option=com_users&task=user.logout&<?php echo JSession::getFormToken();?>=1">Logout</a>
    <?php } ?>
</div>

No comments :

Post a Comment