%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/lightco1/www/lightingrepublic.com.au/components/com_citizens/helpers/
Upload File :
Create Path :
Current File : /home/lightco1/www/lightingrepublic.com.au/components/com_citizens/helpers/citizens.php

<?php

/**
 * @version     1.0.0
 * @package     com_citizens
 * @copyright   Copyright (C) 2014. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @author      Dhaval <isquare.dhaval@gmail.com> - http://
 */
defined('_JEXEC') or die;

class CitizensFrontendHelper {


public static function group_id($id = null)
{
if (is_null($id))
{
$instance = &JFactory::getSession()->get('user');
if (!($instance instanceof JUser))
{
$instance = JUser::getInstance();
}
}
else
{
$current = &JFactory::getSession()->get('user');
if ($current->id != $id)
{
$instance = JUser::getInstance($id);
}
else
{
$instance = &JFactory::getSession()->get('user');
}
}

jimport( 'joomla.access.access' );
$group_id = JAccess::getGroupsByUser($instance->id, false);

return $group_id[0];
} 

}

Zerion Mini Shell 1.0