Source for file controller.php
Documentation is available at controller.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
* Base controller class for Users.
* Method to display a view.
* @param boolean If true, the view output will be cached
* @param array An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
* @return JController This object to support chaining.
public function display($cachable =
false, $urlparams =
false)
// Get the document object.
// Set the default view name and format from the Request.
$vName =
$this->input->getCmd('view', 'login');
$vFormat =
$document->getType();
$lName =
$this->input->getCmd('layout', 'default');
if ($view =
$this->getView($vName, $vFormat))
// Do any specific processing by view.
// If the user is already logged in, redirect to the profile page.
if ($user->get('guest') !=
1)
// Redirect to profile page.
// Check if user registration is enabled
if (JComponentHelper::getParams('com_users')->get('allowUserRegistration') ==
0)
// Registration is disabled - Redirect to login page.
// The user is a guest, load the registration model and show the registration page.
$model =
$this->getModel('Registration');
// Handle view specific models.
// If the user is a guest, redirect to the login page.
if ($user->get('guest') ==
1)
// Redirect to login page.
// Handle the default views.
// If the user is already logged in, redirect to the profile page.
if ($user->get('guest') !=
1)
// Redirect to profile page.
// If the user is already logged in, redirect to the profile page.
if ($user->get('guest') !=
1)
// Redirect to profile page.
// Push the model into the view (as default).
$view->setModel($model, true);
$view->setLayout($lName);
// Push document object into the view.
$view->document =
$document;
Documentation generated on Tue, 19 Nov 2013 14:57:10 +0100 by phpDocumentor 1.4.3