CoreFiles by mySites.guru
login.php52 lines, 1,230 bytes, from Joomla_1.6.3-Stable-Full_Package.zip
Raw History Compare with 1.6.2
md5
9c6f4c68d288a00e303dc24d169218a0
sha1
326f56d92512bc8fc2d52bdb779cb485135204b0
sha256
dab398d1aacc478c568402e4c95a029680954449e3cf6aed36e0a608ff152b49
<?php
/**
 * @version		$Id: login.php 20196 2011-01-09 02:40:25Z ian $
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License, see LICENSE.php
 */

// No direct access.
defined('_JEXEC') or die;

jimport( 'joomla.application.component.model' );

/**
 * Login Model
 *
 * @package		Joomla.Administrator
 * @subpackage	com_login
 * @since		1.5
 */
class LoginModelLogin extends JModel
{
	/**
	 * Method to auto-populate the model state.
	 *
	 * Note. Calling getState in this method will result in recursion.
	 *
	 * @since	1.6
	 */
	protected function populateState()
	{
		$credentials = array(
			'username' => JRequest::getVar('username', '', 'method', 'username'),
			'password' => JRequest::getVar('passwd', '', 'post', 'string', JREQUEST_ALLOWRAW)
		);
		$this->setState('credentials', $credentials);

		// check for return URL from the request first
		if ($return = JRequest::getVar('return', '', 'method', 'base64')) {
			$return = base64_decode($return);
			if (!JURI::isInternal($return)) {
				$return = '';
			}
		}

		// Set the return URL if empty.
		if (empty($return)) {
			$return = 'index.php';
		}

		$this->setState('return', $return);
	}
}

The same content is in 8 releases, Joomla 1.6.0 to 1.7.0. See them all, or every version of this file.