Source for file login.php
Documentation is available at login.php
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* Rest model class for Users.
* Method to get the login form.
* The base form is loaded from XML and then an event is fired
* for users plugins to extend the form with extra fields.
* @param array $data An optional array of data for the form to interogate.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
* @return JForm A JForm object on success, false on failure
public function getForm($data =
array(), $loadData =
true)
$form =
$this->loadForm('com_users.login', 'login', array('load_data' =>
$loadData));
* Method to get the data that should be injected in the form.
* @return array The default data is an empty array.
// Check the session for previously entered login form data.
$data =
$app->getUserState('users.login.form.data', array());
// check for return URL from the request first
// Set the return URL if empty.
if (!isset
($data['return']) ||
empty($data['return']))
$data['return'] =
'index.php?option=com_users&view=profile';
$app->setUserState('users.login.form.data', $data);
* Method to auto-populate the model state.
* Note. Calling getState in this method will result in recursion.
// Get the application object.
* Override JModelAdmin::preprocessForm to ensure the correct plugin group is loaded.
* @param JForm $form A JForm object.
* @param mixed $data The data expected for the form.
* @param string $group The name of the plugin group to import (defaults to "content").
* @throws Exception if there is an error in the form event.
protected function preprocessForm(JForm $form, $data, $group =
'user')
Documentation generated on Tue, 19 Nov 2013 15:07:26 +0100 by phpDocumentor 1.4.3