Source for file view.html.php
Documentation is available at view.html.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
* Profile view class for Users.
* Execute and display a template script.
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
* @return mixed A string if successful, otherwise a Error object.
public function display($tpl =
null)
$this->twofactorform =
$this->get('Twofactorform');
$this->otpConfig =
$this->get('OtpConfig');
if (count($errors =
$this->get('Errors')))
// View also takes responsibility for checking if the user logged in with remember me.
$cookieLogin =
$user->get('cookieLogin');
if (!empty($cookieLogin))
// If so, the user must login to edit the password and other data.
// What should happen here? Should we force a logout which detroys the cookies?
$app->enqueueMessage(JText::_('JGLOBAL_REMEMBER_MUST_LOGIN'), 'message');
$app->redirect(JUri::base() .
'index.php?option=com_users&view=login', '', 302);
// Check if a user was found.
$this->data->tags->getItemTags('com_users.user.', $this->data->id);
// Check for layout override
if (isset
($active->query['layout']))
//Escape strings for HTML output
$menus =
$app->getMenu();
// Because the application sets a default page title,
// we need to get it from the menu item itself
$menu =
$menus->getActive();
$this->params->def('page_heading', $this->params->get('page_title', $user->name));
$this->params->def('page_heading', JText::_('COM_USERS_PROFILE'));
$title =
$this->params->get('page_title', '');
$title =
$app->getCfg('sitename');
elseif ($app->getCfg('sitename_pagetitles', 0) ==
1)
$title =
JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
elseif ($app->getCfg('sitename_pagetitles', 0) ==
2)
$title =
JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
$this->document->setTitle($title);
if ($this->params->get('menu-meta_description'))
$this->document->setDescription($this->params->get('menu-meta_description'));
if ($this->params->get('menu-meta_keywords'))
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
if ($this->params->get('robots'))
$this->document->setMetadata('robots', $this->params->get('robots'));
Documentation generated on Tue, 19 Nov 2013 15:17:22 +0100 by phpDocumentor 1.4.3