Your IP : 216.73.216.89


Current Path : /home/azimutno/www/modules/mod_jf_login/
Upload File :
Current File : /home/azimutno/www/modules/mod_jf_login/helper.php

<?php
/**
 * @package 	JF Login
 * @author		JoomForest.com
 * @email		support@joomforest.com
 * @website		http://www.joomforest.com
 * @copyright	Copyright (C) 2011-2016 JoomForest.com, All rights reserved.
 * @license		http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
**/

// no direct access
defined('_JEXEC') or die;

class ModJFLoginHelper {
	public static function getReturnUrl($params, $type) {
		$app  = JFactory::getApplication();
		$item = $app->getMenu()->getItem($params->get($type));

		$url = JUri::getInstance()->toString();

		if ($item)
		{
			$lang = '';

			if (JLanguageMultilang::isEnabled() && $item->language !== '*')
			{
				$lang = '&lang=' . $item->language;
			}

			$url = 'index.php?Itemid=' . $item->id . $lang;
		}

		return base64_encode($url);
	}

	public static function getType() {
		$user = JFactory::getUser();
		return (!$user->get('guest')) ? 'logout' : 'login';
	}

	public static function getTwoFactorMethods() {
		JLog::add(__METHOD__ . ' is deprecated, use JAuthenticationHelper::getTwoFactorMethods() instead.', JLog::WARNING, 'deprecated');
		return JAuthenticationHelper::getTwoFactorMethods();
	}
}