Source for file users.php
Documentation is available at users.php
* @package Joomla.Administrator
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* Users component helper.
* @package Joomla.Administrator
* @var JObject A cache for the available actions.
protected static $actions;
* @param string $vName The name of the active view.
JText::_('COM_USERS_SUBMENU_USERS'),
'index.php?option=com_users&view=users',
// Groups and Levels are restricted to core.admin
$canDo =
self::getActions();
if ($canDo->get('core.admin'))
JText::_('COM_USERS_SUBMENU_GROUPS'),
'index.php?option=com_users&view=groups',
JText::_('COM_USERS_SUBMENU_LEVELS'),
'index.php?option=com_users&view=levels',
JText::_('COM_USERS_SUBMENU_NOTES'),
'index.php?option=com_users&view=notes',
JText::_('COM_USERS_SUBMENU_NOTE_CATEGORIES'),
'index.php?option=com_categories&extension=com_users',
$vName ==
'categories' ||
$extension ==
'com_users'
* Gets a list of the actions that can be performed.
* @todo Refactor to work with notes
if (empty(self::$actions))
$user =
JFactory::getUser();
self::$actions =
new JObject;
foreach ($actions as $action)
self::$actions->set($action->name, $user->authorise($action->name, 'com_users'));
* Get a list of filter options for the blocked state of a user.
* @return array An array of JHtmlOption elements.
// Build the filter options.
$options[] =
JHtml::_('select.option', '0', JText::_('JENABLED'));
$options[] =
JHtml::_('select.option', '1', JText::_('JDISABLED'));
* Get a list of filter options for the activated state of a user.
* @return array An array of JHtmlOption elements.
// Build the filter options.
$options[] =
JHtml::_('select.option', '0', JText::_('COM_USERS_ACTIVATED'));
$options[] =
JHtml::_('select.option', '1', JText::_('COM_USERS_UNACTIVATED'));
* Get a list of the user groups for filtering.
* @return array An array of JHtmlOption elements.
$query =
$db->getQuery(true)
->select('a.id AS value')
->select('a.title AS text')
->select('COUNT(DISTINCT b.id) AS level')
->from('#__usergroups as a')
->join('LEFT', '#__usergroups AS b ON a.lft > b.lft AND a.rgt < b.rgt')
->group('a.id, a.title, a.lft, a.rgt')
$options =
$db->loadObjectList();
catch
(RuntimeException $e)
foreach ($options as &$option)
$option->text =
str_repeat('- ', $option->level).
$option->text;
* Creates a list of range options used in filter select list
* used in com_users on users view
JHtml::_('select.option', 'today', JText::_('COM_USERS_OPTION_RANGE_TODAY')),
JHtml::_('select.option', 'past_week', JText::_('COM_USERS_OPTION_RANGE_PAST_WEEK')),
JHtml::_('select.option', 'past_1month', JText::_('COM_USERS_OPTION_RANGE_PAST_1MONTH')),
JHtml::_('select.option', 'past_3month', JText::_('COM_USERS_OPTION_RANGE_PAST_3MONTH')),
JHtml::_('select.option', 'past_6month', JText::_('COM_USERS_OPTION_RANGE_PAST_6MONTH')),
JHtml::_('select.option', 'past_year', JText::_('COM_USERS_OPTION_RANGE_PAST_YEAR')),
JHtml::_('select.option', 'post_year', JText::_('COM_USERS_OPTION_RANGE_POST_YEAR')),
* Creates a list of two factor authentication methods used in com_users
// Load the Joomla! RAD layer
JHtml::_('select.option', 'none', JText::_('COM_USERS_OPTION_OTPMETHOD_NONE'), 'value', 'text'),
foreach ($identities as $identity)
$options[] =
JHtml::_('select.option', $identity->method, $identity->title, 'value', 'text');
Documentation generated on Tue, 19 Nov 2013 15:16:38 +0100 by phpDocumentor 1.4.3