PK w>\ helpers/route.phpnu W+A getMenu();
$com = JComponentHelper::getComponent('com_users');
$items = $menu->getItems('component_id', $com->id);
// If no items found, set to empty array.
if (!$items) {
$items = array();
}
}
return $items;
}
/**
* Method to get a route configuration for the login view.
*
* @return mixed Integer menu id on success, null on failure.
* @since 1.6
* @static
*/
public static function getLoginRoute()
{
// Get the items.
$items = self::getItems();
$itemid = null;
// Search for a suitable menu id.
foreach ($items as $item) {
if (isset($item->query['view']) && $item->query['view'] === 'login') {
$itemid = $item->id;
break;
}
}
return $itemid;
}
/**
* Method to get a route configuration for the profile view.
*
* @return mixed Integer menu id on success, null on failure.
* @since 1.6
*/
public static function getProfileRoute()
{
// Get the items.
$items = self::getItems();
$itemid = null;
// Search for a suitable menu id.
//Menu link can only go to users own profile.
foreach ($items as $item) {
if (isset($item->query['view']) && $item->query['view'] === 'profile') {
$itemid = $item->id;
break;
}
}
return $itemid;
}
/**
* Method to get a route configuration for the registration view.
*
* @return mixed Integer menu id on success, null on failure.
* @since 1.6
*/
public static function getRegistrationRoute()
{
// Get the items.
$items = self::getItems();
$itemid = null;
// Search for a suitable menu id.
foreach ($items as $item) {
if (isset($item->query['view']) && $item->query['view'] === 'registration') {
$itemid = $item->id;
break;
}
}
return $itemid;
}
/**
* Method to get a route configuration for the remind view.
*
* @return mixed Integer menu id on success, null on failure.
* @since 1.6
*/
public static function getRemindRoute()
{
// Get the items.
$items = self::getItems();
$itemid = null;
// Search for a suitable menu id.
foreach ($items as $item) {
if (isset($item->query['view']) && $item->query['view'] === 'remind') {
$itemid = $item->id;
break;
}
}
return $itemid;
}
/**
* Method to get a route configuration for the resend view.
*
* @return mixed Integer menu id on success, null on failure.
* @since 1.6
*/
public static function getResendRoute()
{
// Get the items.
$items = self::getItems();
$itemid = null;
// Search for a suitable menu id.
foreach ($items as $item) {
if (isset($item->query['view']) && $item->query['view'] === 'resend') {
$itemid = $item->id;
break;
}
}
return $itemid;
}
/**
* Method to get a route configuration for the reset view.
*
* @return mixed Integer menu id on success, null on failure.
* @since 1.6
*/
public static function getResetRoute()
{
// Get the items.
$items = self::getItems();
$itemid = null;
// Search for a suitable menu id.
foreach ($items as $item) {
if (isset($item->query['view']) && $item->query['view'] === 'reset') {
$itemid = $item->id;
break;
}
}
return $itemid;
}
}
PK w>\) helpers/.htaccessnu W+A
Order allow,deny
Deny from all
PK w>\V helpers/index.htmlnu W+A
PK w>\
router.phpnu W+A getMenu();
$items = $menu->getItems('component', 'com_users');
// Build an array of serialized query strings to menu item id mappings.
for ($i = 0, $n = count($items); $i < $n; $i++) {
// Check to see if we have found the resend menu item.
if (empty($resend) && !empty($items[$i]->query['view']) && ($items[$i]->query['view'] == 'resend')) {
$resend = $items[$i]->id;
}
// Check to see if we have found the reset menu item.
if (empty($reset) && !empty($items[$i]->query['view']) && ($items[$i]->query['view'] == 'reset')) {
$reset = $items[$i]->id;
}
// Check to see if we have found the remind menu item.
if (empty($remind) && !empty($items[$i]->query['view']) && ($items[$i]->query['view'] == 'remind')) {
$remind = $items[$i]->id;
}
// Check to see if we have found the login menu item.
if (empty($login) && !empty($items[$i]->query['view']) && ($items[$i]->query['view'] == 'login')) {
$login = $items[$i]->id;
}
// Check to see if we have found the registration menu item.
if (empty($registration) && !empty($items[$i]->query['view']) && ($items[$i]->query['view'] == 'registration')) {
$registration = $items[$i]->id;
}
// Check to see if we have found the profile menu item.
if (empty($profile) && !empty($items[$i]->query['view']) && ($items[$i]->query['view'] == 'profile')) {
$profile = $items[$i]->id;
}
}
// Set the default menu item to use for com_users if possible.
if ($profile) {
$default = $profile;
} elseif ($registration) {
$default = $registration;
} elseif ($login) {
$default = $login;
}
}
if (!empty($query['view'])) {
switch ($query['view']) {
case 'reset':
if ($query['Itemid'] = $reset) {
unset ($query['view']);
} else {
$query['Itemid'] = $default;
}
break;
case 'resend':
if ($query['Itemid'] = $resend) {
unset ($query['view']);
} else {
$query['Itemid'] = $default;
}
break;
case 'remind':
if ($query['Itemid'] = $remind) {
unset ($query['view']);
} else {
$query['Itemid'] = $default;
}
break;
case 'login':
if ($query['Itemid'] = $login) {
unset ($query['view']);
} else {
$query['Itemid'] = $default;
}
break;
case 'registration':
if ($query['Itemid'] = $registration) {
unset ($query['view']);
} else {
$query['Itemid'] = $default;
}
break;
default:
case 'profile':
if (!empty($query['view'])) {
$segments[] = $query['view'];
}
unset ($query['view']);
if ($query['Itemid'] = $profile) {
unset ($query['view']);
} else {
$query['Itemid'] = $default;
}
// Only append the user id if not "me".
$user = JFactory::getUser();
if (!empty($query['user_id']) && ($query['user_id'] != $user->id)) {
$segments[] = $query['user_id'];
}
unset ($query['user_id']);
break;
}
}
return $segments;
}
/**
* Function to parse a Users URL route.
*
* @param array The URL route with segments represented as an array.
* @return array The array of variables to set in the request.
* @since 1.5
*/
function UsersParseRoute($segments)
{
// Initialise variables.
$vars = array();
// Only run routine if there are segments to parse.
if (count($segments) < 1) {
return;
}
// Get the package from the route segments.
$userId = array_pop($segments);
if (!is_numeric($userId)) {
$vars['view'] = 'profile';
return $vars;
}
if (is_numeric($userId)) {
// Get the package id from the packages table by alias.
$db = JFactory::getDbo();
$db->setQuery(
'SELECT '.$db->quoteName('id') .
' FROM '.$db->quoteName('#__users') .
' WHERE '.$db->quoteName('id').' = '.(int) $userId
);
$userId = $db->loadResult();
}
// Set the package id if present.
if ($userId) {
// Set the package id.
$vars['user_id'] = (int)$userId;
// Set the view to package if not already set.
if (empty($vars['view'])) {
$vars['view'] = 'profile';
}
} else {
JError::raiseError(404, JText::_('JGLOBAL_RESOURCE_NOT_FOUND'));
}
return $vars;
}
PK w>\w' models/login.phpnu W+A loadForm('com_users.login', 'login', array('load_data' => $loadData));
if (empty($form)) {
return false;
}
return $form;
}
/**
* Method to get the data that should be injected in the form.
*
* @return array The default data is an empty array.
* @since 1.6
*/
protected function loadFormData()
{
// Check the session for previously entered login form data.
$app = JFactory::getApplication();
$data = $app->getUserState('users.login.form.data', array());
// check for return URL from the request first
if ($return = JRequest::getVar('return', '', 'method', 'base64')) {
$data['return'] = base64_decode($return);
if (!JURI::isInternal($data['return'])) {
$data['return'] = '';
}
}
// 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);
return $data;
}
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @since 1.6
*/
protected function populateState()
{
// Get the application object.
$params = JFactory::getApplication()->getParams('com_users');
// Load the parameters.
$this->setState('params', $params);
}
/**
* Method to allow derived classes to preprocess the form.
*
* @param object A form object.
* @param mixed The data expected for the form.
* @param string The name of the plugin group to import (defaults to "content").
* @throws Exception if there is an error in the form event.
* @since 1.6
*/
protected function preprocessForm(JForm $form, $data, $group = 'user')
{
// Import the approriate plugin group.
JPluginHelper::importPlugin($group);
// Get the dispatcher.
$dispatcher = JDispatcher::getInstance();
// Trigger the form preparation event.
$results = $dispatcher->trigger('onContentPrepareForm', array($form, $data));
// Check for errors encountered while preparing the form.
if (count($results) && in_array(false, $results, true)) {
// Get the last error.
$error = $dispatcher->getError();
// Convert to a JException if necessary.
if (!($error instanceof Exception)) {
throw new Exception($error);
}
}
}
}
PK w>\:
'|- |- models/reset.phpnu W+A loadForm('com_users.reset_request', 'reset_request', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form)) {
return false;
}
return $form;
}
/**
* Method to get the password reset complete form.
*
* @param array $data Data for the form.
* @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
* @since 1.6
*/
public function getResetCompleteForm($data = array(), $loadData = true)
{
// Get the form.
$form = $this->loadForm('com_users.reset_complete', 'reset_complete', $options = array('control' => 'jform'));
if (empty($form)) {
return false;
}
return $form;
}
/**
* Method to get the password reset confirm form.
*
* @param array $data Data for the form.
* @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
* @since 1.6
*/
public function getResetConfirmForm($data = array(), $loadData = true)
{
// Get the form.
$form = $this->loadForm('com_users.reset_confirm', 'reset_confirm', $options = array('control' => 'jform'));
if (empty($form)) {
return false;
}
return $form;
}
/**
* Override preprocessForm to load the user plugin group instead of content.
*
* @param object A form object.
* @param mixed The data expected for the form.
* @throws Exception if there is an error in the form event.
* @since 1.6
*/
protected function preprocessForm(JForm $form, $data, $group = 'user')
{
parent::preprocessForm($form, $data, $group);
}
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @since 1.6
*/
protected function populateState()
{
// Get the application object.
$params = JFactory::getApplication()->getParams('com_users');
// Load the parameters.
$this->setState('params', $params);
}
/**
* @since 1.6
*/
function processResetComplete($data)
{
// Get the form.
$form = $this->getResetCompleteForm();
// Check for an error.
if ($form instanceof Exception) {
return $form;
}
// Filter and validate the form data.
$data = $form->filter($data);
$return = $form->validate($data);
// Check for an error.
if ($return instanceof Exception) {
return $return;
}
// Check the validation results.
if ($return === false) {
// Get the validation messages from the form.
foreach ($form->getErrors() as $message) {
$this->setError($message);
}
return false;
}
// Get the token and user id from the confirmation process.
$app = JFactory::getApplication();
$token = $app->getUserState('com_users.reset.token', null);
$userId = $app->getUserState('com_users.reset.user', null);
// Check the token and user id.
if (empty($token) || empty($userId)) {
return new JException(JText::_('COM_USERS_RESET_COMPLETE_TOKENS_MISSING'), 403);
}
// Get the user object.
$user = JUser::getInstance($userId);
// Check for a user and that the tokens match.
if (empty($user) || $user->activation !== $token) {
$this->setError(JText::_('COM_USERS_USER_NOT_FOUND'));
return false;
}
// Make sure the user isn't blocked.
if ($user->block) {
$this->setError(JText::_('COM_USERS_USER_BLOCKED'));
return false;
}
// Generate the new password hash.
$password = JUserHelper::hashPassword($data['password1']);
// Update the user object.
$user->password = $password;
$user->activation = '';
$user->password_clear = $data['password1'];
// Save the user to the database.
if (!$user->save(true)) {
return new JException(JText::sprintf('COM_USERS_USER_SAVE_FAILED', $user->getError()), 500);
}
// Flush the user data from the session.
$app->setUserState('com_users.reset.token', null);
$app->setUserState('com_users.reset.user', null);
return true;
}
/**
* @since 1.6
*/
function processResetConfirm($data)
{
// Get the form.
$form = $this->getResetConfirmForm();
// Check for an error.
if ($form instanceof Exception) {
return $form;
}
// Filter and validate the form data.
$data = $form->filter($data);
$return = $form->validate($data);
// Check for an error.
if ($return instanceof Exception) {
return $return;
}
// Check the validation results.
if ($return === false) {
// Get the validation messages from the form.
foreach ($form->getErrors() as $message) {
$this->setError($message);
}
return false;
}
// Find the user id for the given token.
$db = $this->getDbo();
$query = $db->getQuery(true);
$query->select('activation');
$query->select('id');
$query->select('block');
$query->from($db->quoteName('#__users'));
$query->where($db->quoteName('username').' = '.$db->Quote($data['username']));
// Get the user id.
$db->setQuery((string) $query);
$user = $db->loadObject();
// Check for an error.
if ($db->getErrorNum()) {
return new JException(JText::sprintf('COM_USERS_DATABASE_ERROR', $db->getErrorMsg()), 500);
}
// Check for a user.
if (empty($user)) {
$this->setError(JText::_('COM_USERS_USER_NOT_FOUND'));
return false;
}
$parts = explode( ':', $user->activation );
$crypt = $parts[0];
if (!isset($parts[1])) {
$this->setError(JText::_('COM_USERS_USER_NOT_FOUND'));
return false;
}
$salt = $parts[1];
$testcrypt = JUserHelper::getCryptedPassword($data['token'], $salt);
// Verify the token
if (!($crypt == $testcrypt))
{
$this->setError(JText::_('COM_USERS_USER_NOT_FOUND'));
return false;
}
// Make sure the user isn't blocked.
if ($user->block) {
$this->setError(JText::_('COM_USERS_USER_BLOCKED'));
return false;
}
// Push the user data into the session.
$app = JFactory::getApplication();
$app->setUserState('com_users.reset.token', $crypt.':'.$salt);
$app->setUserState('com_users.reset.user', $user->id);
return true;
}
/**
* Method to start the password reset process.
*
* @since 1.6
*/
public function processResetRequest($data)
{
$config = JFactory::getConfig();
// Get the form.
$form = $this->getForm();
// Check for an error.
if ($form instanceof Exception) {
return $form;
}
// Filter and validate the form data.
$data = $form->filter($data);
$return = $form->validate($data);
// Check for an error.
if ($return instanceof Exception) {
return $return;
}
// Check the validation results.
if ($return === false) {
// Get the validation messages from the form.
foreach ($form->getErrors() as $message) {
$this->setError($message);
}
return false;
}
// Find the user id for the given email address.
$db = $this->getDbo();
$query = $db->getQuery(true);
$query->select('id');
$query->from($db->quoteName('#__users'));
$query->where($db->quoteName('email').' = '.$db->Quote($data['email']));
// Get the user object.
$db->setQuery((string) $query);
$userId = $db->loadResult();
// Check for an error.
if ($db->getErrorNum()) {
$this->setError(JText::sprintf('COM_USERS_DATABASE_ERROR', $db->getErrorMsg()), 500);
return false;
}
// Check for a user.
if (empty($userId)) {
$this->setError(JText::_('COM_USERS_INVALID_EMAIL'));
return false;
}
// Get the user object.
$user = JUser::getInstance($userId);
// Make sure the user isn't blocked.
if ($user->block) {
$this->setError(JText::_('COM_USERS_USER_BLOCKED'));
return false;
}
// Make sure the user isn't a Super Admin.
if ($user->authorise('core.admin')) {
$this->setError(JText::_('COM_USERS_REMIND_SUPERADMIN_ERROR'));
return false;
}
// Make sure the user has not exceeded the reset limit
if (!$this->checkResetLimit($user)) {
$resetLimit = (int) JFactory::getApplication()->getParams()->get('reset_time');
$this->setError(JText::plural('COM_USERS_REMIND_LIMIT_ERROR_N_HOURS', $resetLimit));
return false;
}
// Set the confirmation token.
$token = JApplication::getHash(JUserHelper::genRandomPassword());
$salt = JUserHelper::getSalt('crypt-md5');
$hashedToken = md5($token.$salt).':'.$salt;
$user->activation = $hashedToken;
// Save the user to the database.
if (!$user->save(true)) {
return new JException(JText::sprintf('COM_USERS_USER_SAVE_FAILED', $user->getError()), 500);
}
// Assemble the password reset confirmation link.
$mode = $config->get('force_ssl', 0) == 2 ? 1 : -1;
$itemid = UsersHelperRoute::getLoginRoute();
$itemid = $itemid !== null ? '&Itemid='.$itemid : '';
$link = 'index.php?option=com_users&view=reset&layout=confirm'.$itemid;
// Put together the email template data.
$data = $user->getProperties();
$data['fromname'] = $config->get('fromname');
$data['mailfrom'] = $config->get('mailfrom');
$data['sitename'] = $config->get('sitename');
$data['link_text'] = JRoute::_($link, false, $mode);
$data['link_html'] = JRoute::_($link, true, $mode);
$data['token'] = $token;
$subject = JText::sprintf(
'COM_USERS_EMAIL_PASSWORD_RESET_SUBJECT',
$data['sitename']
);
$body = JText::sprintf(
'COM_USERS_EMAIL_PASSWORD_RESET_BODY',
$data['sitename'],
$data['token'],
$data['link_text']
);
// Send the password reset request email.
$return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $user->email, $subject, $body);
// Check for an error.
if ($return !== true) {
return new JException(JText::_('COM_USERS_MAIL_FAILED'), 500);
}
return true;
}
/**
* Method to check if user reset limit has been exceeded within the allowed time period.
*
* @param JUser the user doing the password reset
*
* @return boolean true if user can do the reset, false if limit exceeded
*
* @since 2.5
*/
public function checkResetLimit($user)
{
$params = JFactory::getApplication()->getParams();
$maxCount = (int) $params->get('reset_count');
$resetHours = (int) $params->get('reset_time');
$result = true;
$lastResetTime = strtotime($user->lastResetTime) ? strtotime($user->lastResetTime) : 0;
$hoursSinceLastReset = (strtotime(JFactory::getDate()->toSql()) - $lastResetTime) / 3600;
// If it's been long enough, start a new reset count
if ($hoursSinceLastReset > $resetHours)
{
$user->lastResetTime = JFactory::getDate()->toSql();
$user->resetCount = 1;
}
// If we are under the max count, just increment the counter
elseif ($user->resetCount < $maxCount)
{
$user->resetCount;
}
// At this point, we know we have exceeded the maximum resets for the time period
else
{
$result = false;
}
return $result;
}
}
PK w>\S{ models/remind.phpnu W+A loadForm('com_users.remind', 'remind', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form)) {
return false;
}
return $form;
}
/**
* Override preprocessForm to load the user plugin group instead of content.
*
* @param object A form object.
* @param mixed The data expected for the form.
* @throws Exception if there is an error in the form event.
* @since 1.6
*/
protected function preprocessForm(JForm $form, $data, $group = 'user')
{
parent::preprocessForm($form, $data, 'user');
}
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @since 1.6
*/
protected function populateState()
{
// Get the application object.
$app = JFactory::getApplication();
$params = $app->getParams('com_users');
// Load the parameters.
$this->setState('params', $params);
}
/**
* @since 1.6
*/
public function processRemindRequest($data)
{
// Get the form.
$form = $this->getForm();
// Check for an error.
if (empty($form)) {
return false;
}
// Validate the data.
$data = $this->validate($form, $data);
// Check for an error.
if ($data instanceof Exception) {
return $return;
}
// Check the validation results.
if ($data === false) {
// Get the validation messages from the form.
foreach ($form->getErrors() as $message) {
$this->setError($message);
}
return false;
}
// Find the user id for the given email address.
$db = $this->getDbo();
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__users'));
$query->where($db->quoteName('email').' = '.$db->Quote($data['email']));
// Get the user id.
$db->setQuery((string) $query);
$user = $db->loadObject();
// Check for an error.
if ($db->getErrorNum()) {
$this->setError(JText::sprintf('COM_USERS_DATABASE_ERROR', $db->getErrorMsg()), 500);
return false;
}
// Check for a user.
if (empty($user)) {
$this->setError(JText::_('COM_USERS_USER_NOT_FOUND'));
return false;
}
// Make sure the user isn't blocked.
if ($user->block) {
$this->setError(JText::_('COM_USERS_USER_BLOCKED'));
return false;
}
$config = JFactory::getConfig();
// Assemble the login link.
$itemid = UsersHelperRoute::getLoginRoute();
$itemid = $itemid !== null ? '&Itemid='.$itemid : '';
$link = 'index.php?option=com_users&view=login'.$itemid;
$mode = $config->get('force_ssl', 0) == 2 ? 1 : -1;
// Put together the email template data.
$data = JArrayHelper::fromObject($user);
$data['fromname'] = $config->get('fromname');
$data['mailfrom'] = $config->get('mailfrom');
$data['sitename'] = $config->get('sitename');
$data['link_text'] = JRoute::_($link, false, $mode);
$data['link_html'] = JRoute::_($link, true, $mode);
$subject = JText::sprintf(
'COM_USERS_EMAIL_USERNAME_REMINDER_SUBJECT',
$data['sitename']
);
$body = JText::sprintf(
'COM_USERS_EMAIL_USERNAME_REMINDER_BODY',
$data['sitename'],
$data['username'],
$data['link_text']
);
// Send the password reset request email.
$return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $user->email, $subject, $body);
// Check for an error.
if ($return !== true) {
$this->setError(JText::_('COM_USERS_MAIL_FAILED'), 500);
return false;
}
return true;
}
}
PK w>\'
models/forms/reset_complete.xmlnu W+A
PK w>\) models/forms/.htaccessnu W+A
Order allow,deny
Deny from all
PK w>\5g models/forms/remind.xmlnu W+A
PK w>\w models/forms/profile.xmlnu W+A
PK w>\v> models/forms/sitelang.xmlnu W+A
PK w>\ k? models/forms/frontend_admin.xmlnu W+A
PK w>\ models/forms/reset_request.xmlnu W+A
PK w>\!z models/forms/login.xmlnu W+A
PK w>\V models/forms/index.htmlnu W+A
PK w>\s models/forms/reset_confirm.xmlnu W+A
PK w>\9[7 models/forms/registration.xmlnu W+A
PK w>\ᤍ" models/forms/frontend.xmlnu W+A
PK w>\#?
9
9 models/registration.phpnu W+A getDbo();
// Get the user id based on the token.
$db->setQuery(
'SELECT '.$db->quoteName('id').' FROM '.$db->quoteName('#__users') .
' WHERE '.$db->quoteName('activation').' = '.$db->Quote($token) .
' AND '.$db->quoteName('block').' = 1' .
' AND '.$db->quoteName('lastvisitDate').' = '.$db->Quote($db->getNullDate())
);
$userId = (int) $db->loadResult();
// Check for a valid user id.
if (!$userId) {
$this->setError(JText::_('COM_USERS_ACTIVATION_TOKEN_NOT_FOUND'));
return false;
}
// Load the users plugin group.
JPluginHelper::importPlugin('user');
// Activate the user.
$user = JFactory::getUser($userId);
// Admin activation is on and user is verifying their email
if (($userParams->get('useractivation') == 2) && !$user->getParam('activate', 0))
{
$uri = JURI::getInstance();
// Compile the admin notification mail values.
$data = $user->getProperties();
$data['activation'] = JApplication::getHash(JUserHelper::genRandomPassword());
$user->set('activation', $data['activation']);
$data['siteurl'] = JUri::base();
$base = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port'));
$data['activate'] = $base.JRoute::_('index.php?option=com_users&task=registration.activate&token='.$data['activation'], false);
$data['fromname'] = $config->get('fromname');
$data['mailfrom'] = $config->get('mailfrom');
$data['sitename'] = $config->get('sitename');
$user->setParam('activate', 1);
$emailSubject = JText::sprintf(
'COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_SUBJECT',
$data['name'],
$data['sitename']
);
$emailBody = JText::sprintf(
'COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_BODY',
$data['sitename'],
$data['name'],
$data['email'],
$data['username'],
$data['activate']
);
// get all admin users
$query = 'SELECT name, email, sendEmail, id' .
' FROM #__users' .
' WHERE sendEmail=1';
$db->setQuery( $query );
$rows = $db->loadObjectList();
// Send mail to all users with users creating permissions and receiving system emails
foreach( $rows as $row )
{
$usercreator = JFactory::getUser($id = $row->id);
if ($usercreator->authorise('core.create', 'com_users'))
{
$return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $row->email, $emailSubject, $emailBody);
// Check for an error.
if ($return !== true) {
$this->setError(JText::_('COM_USERS_REGISTRATION_ACTIVATION_NOTIFY_SEND_MAIL_FAILED'));
return false;
}
}
}
}
//Admin activation is on and admin is activating the account
elseif (($userParams->get('useractivation') == 2) && $user->getParam('activate', 0))
{
$user->set('activation', '');
$user->set('block', '0');
$uri = JURI::getInstance();
// Compile the user activated notification mail values.
$data = $user->getProperties();
$user->setParam('activate', 0);
$data['fromname'] = $config->get('fromname');
$data['mailfrom'] = $config->get('mailfrom');
$data['sitename'] = $config->get('sitename');
$data['siteurl'] = JUri::base();
$emailSubject = JText::sprintf(
'COM_USERS_EMAIL_ACTIVATED_BY_ADMIN_ACTIVATION_SUBJECT',
$data['name'],
$data['sitename']
);
$emailBody = JText::sprintf(
'COM_USERS_EMAIL_ACTIVATED_BY_ADMIN_ACTIVATION_BODY',
$data['name'],
$data['siteurl'],
$data['username']
);
$return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $data['email'], $emailSubject, $emailBody);
// Check for an error.
if ($return !== true) {
$this->setError(JText::_('COM_USERS_REGISTRATION_ACTIVATION_NOTIFY_SEND_MAIL_FAILED'));
return false;
}
}
else
{
$user->set('activation', '');
$user->set('block', '0');
}
// Store the user object.
if (!$user->save()) {
$this->setError(JText::sprintf('COM_USERS_REGISTRATION_ACTIVATION_SAVE_FAILED', $user->getError()));
return false;
}
return $user;
}
/**
* Method to get the registration form data.
*
* The base form data is loaded and then an event is fired
* for users plugins to extend the data.
*
* @return mixed Data object on success, false on failure.
* @since 1.6
*/
public function getData()
{
if ($this->data === null) {
$this->data = new stdClass();
$app = JFactory::getApplication();
$params = JComponentHelper::getParams('com_users');
// Override the base user data with any data in the session.
$temp = (array)$app->getUserState('com_users.registration.data', array());
foreach ($temp as $k => $v) {
$this->data->$k = $v;
}
// Get the groups the user should be added to after registration.
$this->data->groups = array();
// Get the default new user group, Registered if not specified.
$system = $params->get('new_usertype', 2);
$this->data->groups[] = $system;
// Unset the passwords.
unset($this->data->password1);
unset($this->data->password2);
// Get the dispatcher and load the users plugins.
$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('user');
// Trigger the data preparation event.
$results = $dispatcher->trigger('onContentPrepareData', array('com_users.registration', $this->data));
// Check for errors encountered while preparing the data.
if (count($results) && in_array(false, $results, true)) {
$this->setError($dispatcher->getError());
$this->data = false;
}
}
return $this->data;
}
/**
* Method to get the registration 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
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{
// Get the form.
$form = $this->loadForm('com_users.registration', 'registration', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form)) {
return false;
}
return $form;
}
/**
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form.
* @since 1.6
*/
protected function loadFormData()
{
return $this->getData();
}
/**
* Override preprocessForm to load the user plugin group instead of content.
*
* @param object A form object.
* @param mixed The data expected for the form.
* @throws Exception if there is an error in the form event.
* @since 1.6
*/
protected function preprocessForm(JForm $form, $data, $group = 'user')
{
$userParams = JComponentHelper::getParams('com_users');
//Add the choice for site language at registration time
if ($userParams->get('site_language') == 1 && $userParams->get('frontend_userparams') == 1)
{
$form->loadFile('sitelang', false);
}
parent::preprocessForm($form, $data, $group);
}
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @since 1.6
*/
protected function populateState()
{
// Get the application object.
$app = JFactory::getApplication();
$params = $app->getParams('com_users');
// Load the parameters.
$this->setState('params', $params);
}
/**
* Method to save the form data.
*
* @param array The form data.
* @return mixed The user id on success, false on failure.
* @since 1.6
*/
public function register($temp)
{
$config = JFactory::getConfig();
$db = $this->getDbo();
$params = JComponentHelper::getParams('com_users');
// Initialise the table with JUser.
$user = new JUser;
$data = (array)$this->getData();
// Merge in the registration data.
foreach ($temp as $k => $v) {
$data[$k] = $v;
}
// Prepare the data for the user object.
$data['email'] = $data['email1'];
$data['password'] = $data['password1'];
$useractivation = $params->get('useractivation');
$sendpassword = $params->get('sendpassword', 1);
// Check if the user needs to activate their account.
if (($useractivation == 1) || ($useractivation == 2)) {
$data['activation'] = JApplication::getHash(JUserHelper::genRandomPassword());
$data['block'] = 1;
}
// Bind the data.
if (!$user->bind($data)) {
$this->setError(JText::sprintf('COM_USERS_REGISTRATION_BIND_FAILED', $user->getError()));
return false;
}
// Load the users plugin group.
JPluginHelper::importPlugin('user');
// Store the data.
if (!$user->save()) {
$this->setError(JText::sprintf('COM_USERS_REGISTRATION_SAVE_FAILED', $user->getError()));
return false;
}
// Compile the notification mail values.
$data = $user->getProperties();
$data['fromname'] = $config->get('fromname');
$data['mailfrom'] = $config->get('mailfrom');
$data['sitename'] = $config->get('sitename');
$data['siteurl'] = JUri::root();
// Handle account activation/confirmation emails.
if ($useractivation == 2)
{
// Set the link to confirm the user email.
$uri = JURI::getInstance();
$base = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port'));
$data['activate'] = $base.JRoute::_('index.php?option=com_users&task=registration.activate&token='.$data['activation'], false);
$emailSubject = JText::sprintf(
'COM_USERS_EMAIL_ACCOUNT_DETAILS',
$data['name'],
$data['sitename']
);
if ($sendpassword)
{
$emailBody = JText::sprintf(
'COM_USERS_EMAIL_REGISTERED_WITH_ADMIN_ACTIVATION_BODY',
$data['name'],
$data['sitename'],
$data['activate'],
$data['siteurl'],
$data['username'],
$data['password_clear']
);
}
else
{
$emailBody = JText::sprintf(
'COM_USERS_EMAIL_REGISTERED_WITH_ADMIN_ACTIVATION_BODY_NOPW',
$data['name'],
$data['sitename'],
$data['activate'],
$data['siteurl'],
$data['username']
);
}
}
elseif ($useractivation == 1)
{
// Set the link to activate the user account.
$uri = JURI::getInstance();
$base = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port'));
$data['activate'] = $base.JRoute::_('index.php?option=com_users&task=registration.activate&token='.$data['activation'], false);
$emailSubject = JText::sprintf(
'COM_USERS_EMAIL_ACCOUNT_DETAILS',
$data['name'],
$data['sitename']
);
if ($sendpassword)
{
$emailBody = JText::sprintf(
'COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY',
$data['name'],
$data['sitename'],
$data['activate'],
$data['siteurl'],
$data['username'],
$data['password_clear']
);
}
else
{
$emailBody = JText::sprintf(
'COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY_NOPW',
$data['name'],
$data['sitename'],
$data['activate'],
$data['siteurl'],
$data['username']
);
}
}
else
{
$emailSubject = JText::sprintf(
'COM_USERS_EMAIL_ACCOUNT_DETAILS',
$data['name'],
$data['sitename']
);
$emailBody = JText::sprintf(
'COM_USERS_EMAIL_REGISTERED_BODY',
$data['name'],
$data['sitename'],
$data['siteurl']
);
}
// Send the registration email.
$return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $data['email'], $emailSubject, $emailBody);
//Send Notification mail to administrators
if (($params->get('useractivation') < 2) && ($params->get('mail_to_admin') == 1)) {
$emailSubject = JText::sprintf(
'COM_USERS_EMAIL_ACCOUNT_DETAILS',
$data['name'],
$data['sitename']
);
$emailBodyAdmin = JText::sprintf(
'COM_USERS_EMAIL_REGISTERED_NOTIFICATION_TO_ADMIN_BODY',
$data['name'],
$data['username'],
$data['siteurl']
);
// get all admin users
$query = 'SELECT name, email, sendEmail' .
' FROM #__users' .
' WHERE sendEmail=1';
$db->setQuery( $query );
$rows = $db->loadObjectList();
// Send mail to all superadministrators id
foreach( $rows as $row )
{
$return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $row->email, $emailSubject, $emailBodyAdmin);
// Check for an error.
if ($return !== true) {
$this->setError(JText::_('COM_USERS_REGISTRATION_ACTIVATION_NOTIFY_SEND_MAIL_FAILED'));
return false;
}
}
}
// Check for an error.
if ($return !== true) {
$this->setError(JText::_('COM_USERS_REGISTRATION_SEND_MAIL_FAILED'));
// Send a system message to administrators receiving system mails
$db = JFactory::getDBO();
$q = "SELECT id
FROM #__users
WHERE block = 0
AND sendEmail = 1";
$db->setQuery($q);
$sendEmail = $db->loadColumn();
if (count($sendEmail) > 0) {
$jdate = new JDate();
// Build the query to add the messages
$q = "INSERT INTO ".$db->quoteName('#__messages')." (".$db->quoteName('user_id_from').
", ".$db->quoteName('user_id_to').", ".$db->quoteName('date_time').
", ".$db->quoteName('subject').", ".$db->quoteName('message').") VALUES ";
$messages = array();
foreach ($sendEmail as $userid) {
$messages[] = "(".$userid.", ".$userid.", '".$jdate->toSql()."', '".JText::_('COM_USERS_MAIL_SEND_FAILURE_SUBJECT')."', '".JText::sprintf('COM_USERS_MAIL_SEND_FAILURE_BODY', $return, $data['username'])."')";
}
$q .= implode(',', $messages);
$db->setQuery($q);
$db->query();
}
return false;
}
if ($useractivation == 1)
return "useractivate";
elseif ($useractivation == 2)
return "adminactivate";
else
return $user->id;
}
}
PK w>\V models/index.htmlnu W+A
PK w>\T& models/profile.phpnu W+A getState('user.id');
if ($userId) {
// Initialise the table with JUser.
$table = JTable::getInstance('User');
// Attempt to check the row in.
if (!$table->checkin($userId)) {
$this->setError($table->getError());
return false;
}
}
return true;
}
/**
* Method to check out a user for editing.
*
* @param integer The id of the row to check out.
* @return boolean True on success, false on failure.
* @since 1.6
*/
public function checkout($userId = null)
{
// Get the user id.
$userId = (!empty($userId)) ? $userId : (int)$this->getState('user.id');
if ($userId) {
// Initialise the table with JUser.
$table = JTable::getInstance('User');
// Get the current user object.
$user = JFactory::getUser();
// Attempt to check the row out.
if (!$table->checkout($user->get('id'), $userId)) {
$this->setError($table->getError());
return false;
}
}
return true;
}
/**
* Method to get the profile form data.
*
* The base form data is loaded and then an event is fired
* for users plugins to extend the data.
*
* @return mixed Data object on success, false on failure.
* @since 1.6
*/
public function getData()
{
if ($this->data === null) {
$userId = $this->getState('user.id');
// Initialise the table with JUser.
$this->data = new JUser($userId);
// Set the base user data.
$this->data->email1 = $this->data->get('email');
$this->data->email2 = $this->data->get('email');
// Override the base user data with any data in the session.
$temp = (array)JFactory::getApplication()->getUserState('com_users.edit.profile.data', array());
foreach ($temp as $k => $v) {
$this->data->$k = $v;
}
// Unset the passwords.
unset($this->data->password1);
unset($this->data->password2);
$registry = new JRegistry($this->data->params);
$this->data->params = $registry->toArray();
// Get the dispatcher and load the users plugins.
$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('user');
// Trigger the data preparation event.
$results = $dispatcher->trigger('onContentPrepareData', array('com_users.profile', $this->data));
// Check for errors encountered while preparing the data.
if (count($results) && in_array(false, $results, true)) {
$this->setError($dispatcher->getError());
$this->data = false;
}
}
return $this->data;
}
/**
* Method to get the profile 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
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{
// Get the form.
$form = $this->loadForm('com_users.profile', 'profile', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form)) {
return false;
}
// Check for username compliance and parameter set
$isUsernameCompliant = true;
if ($this->loadFormData()->username)
{
$username = $this->loadFormData()->username;
$isUsernameCompliant = !(preg_match('#[<>"\'%;()&\\\\]|\\.\\./#', $username) || strlen(utf8_decode($username)) < 2
|| trim($username) != $username);
}
$this->setState('user.username.compliant', $isUsernameCompliant);
if (!JComponentHelper::getParams('com_users')->get('change_login_name') && $isUsernameCompliant)
{
$form->setFieldAttribute('username', 'class', '');
$form->setFieldAttribute('username', 'filter', '');
$form->setFieldAttribute('username', 'description', 'COM_USERS_PROFILE_NOCHANGE_USERNAME_DESC');
$form->setFieldAttribute('username', 'validate', '');
$form->setFieldAttribute('username', 'message', '');
$form->setFieldAttribute('username', 'readonly', 'true');
$form->setFieldAttribute('username', 'required', 'false');
}
return $form;
}
/**
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form.
* @since 1.6
*/
protected function loadFormData()
{
return $this->getData();
}
/**
* Override preprocessForm to load the user plugin group instead of content.
*
* @param object A form object.
* @param mixed The data expected for the form.
* @throws Exception if there is an error in the form event.
* @since 1.6
*/
protected function preprocessForm(JForm $form, $data, $group = 'user')
{
if (JComponentHelper::getParams('com_users')->get('frontend_userparams'))
{
$form->loadFile('frontend', false);
if (JFactory::getUser()->authorise('core.login.admin')) {
$form->loadFile('frontend_admin', false);
}
}
parent::preprocessForm($form, $data, $group);
}
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @since 1.6
*/
protected function populateState()
{
// Get the application object.
$params = JFactory::getApplication()->getParams('com_users');
// Get the user id.
$userId = JFactory::getApplication()->getUserState('com_users.edit.profile.id');
$userId = !empty($userId) ? $userId : (int)JFactory::getUser()->get('id');
// Set the user id.
$this->setState('user.id', $userId);
// Load the parameters.
$this->setState('params', $params);
}
/**
* Method to save the form data.
*
* @param array The form data.
* @return mixed The user id on success, false on failure.
* @since 1.6
*/
public function save($data)
{
$userId = (!empty($data['id'])) ? $data['id'] : (int)$this->getState('user.id');
$user = new JUser($userId);
// Prepare the data for the user object.
$data['email'] = $data['email1'];
$data['password'] = $data['password1'];
// Unset the username if it should not be overwritten
$username = $data['username'];
$isUsernameCompliant = $this->getState('user.username.compliant');
if (!JComponentHelper::getParams('com_users')->get('change_login_name') && $isUsernameCompliant)
{
unset($data['username']);
}
// Unset the block so it does not get overwritten
unset($data['block']);
// Unset the sendEmail so it does not get overwritten
unset($data['sendEmail']);
// Bind the data.
if (!$user->bind($data)) {
$this->setError(JText::sprintf('COM_USERS_PROFILE_BIND_FAILED', $user->getError()));
return false;
}
// Load the users plugin group.
JPluginHelper::importPlugin('user');
// Null the user groups so they don't get overwritten
$user->groups = null;
// Store the data.
if (!$user->save()) {
$this->setError($user->getError());
return false;
}
return $user->id;
}
}
PK w>\) models/.htaccessnu W+A
Order allow,deny
Deny from all
PK w>\hN
controller.phpnu W+A getType();
$lName = JRequest::getCmd('layout', 'default');
if ($view = $this->getView($vName, $vFormat)) {
// Do any specific processing by view.
switch ($vName) {
case 'registration':
// If the user is already logged in, redirect to the profile page.
$user = JFactory::getUser();
if ($user->get('guest') != 1) {
// Redirect to profile page.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=profile', false));
return;
}
// Check if user registration is enabled
if(JComponentHelper::getParams('com_users')->get('allowUserRegistration') == 0) {
// Registration is disabled - Redirect to login page.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=login', false));
return;
}
// The user is a guest, load the registration model and show the registration page.
$model = $this->getModel('Registration');
break;
// Handle view specific models.
case 'profile':
// If the user is a guest, redirect to the login page.
$user = JFactory::getUser();
if ($user->get('guest') == 1) {
// Redirect to login page.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=login', false));
return;
}
$model = $this->getModel($vName);
break;
// Handle the default views.
case 'login':
$model = $this->getModel($vName);
break;
case 'reset':
// If the user is already logged in, redirect to the profile page.
$user = JFactory::getUser();
if ($user->get('guest') != 1) {
// Redirect to profile page.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=profile', false));
return;
}
$model = $this->getModel($vName);
break;
case 'remind':
// If the user is already logged in, redirect to the profile page.
$user = JFactory::getUser();
if ($user->get('guest') != 1) {
// Redirect to profile page.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=profile', false));
return;
}
$model = $this->getModel($vName);
break;
default:
$model = $this->getModel('Login');
break;
}
// Push the model into the view (as default).
$view->setModel($model, true);
$view->setLayout($lName);
// Push document object into the view.
$view->assignRef('document', $document);
$view->display();
}
}
}
PK w>\=% views/reset/metadata.xmlnu W+A
PK w>\V views/reset/index.htmlnu W+A
PK w>\V views/reset/tmpl/index.htmlnu W+A
PK w>\
views/reset/tmpl/complete.phpnu W+A
params->get('show_page_heading')) : ?>
escape($this->params->get('page_heading')); ?>
PK w>\vx views/reset/tmpl/confirm.phpnu W+A
params->get('show_page_heading')) : ?>
escape($this->params->get('page_heading')); ?>
PK w>\) views/reset/tmpl/.htaccessnu W+A
Order allow,deny
Deny from all
PK w>\+yv views/reset/tmpl/default.phpnu W+A
params->get('show_page_heading')) : ?>
escape($this->params->get('page_heading')); ?>
PK w>\2 2 views/reset/tmpl/default.xmlnu W+A
PK w>\) views/reset/.htaccessnu W+A
Order allow,deny
Deny from all
PK w>\!
views/reset/view.html.phpnu W+A getLayout();
// Check that the name is valid - has an associated model.
if( ! in_array($name, array('confirm', 'complete'))) {
$name = 'default';
}
if ('default' == $name) {
$formname = 'Form';
} else {
$formname = ucfirst($this->_name).ucfirst($name).'Form';
}
// Get the view data.
$this->form = $this->get($formname);
$this->state = $this->get('State');
$this->params = $this->state->params;
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode(' ', $errors));
return false;
}
//Escape strings for HTML output
$this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
$this->prepareDocument();
parent::display($tpl);
}
/**
* Prepares the document.
*
* @since 1.6
*/
protected function prepareDocument()
{
$app = JFactory::getApplication();
$menus = $app->getMenu();
$title = null;
// Because the application sets a default page title,
// we need to get it from the menu item itself
$menu = $menus->getActive();
if($menu)
{
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
} else {
$this->params->def('page_heading', JText::_('COM_USERS_RESET'));
}
$title = $this->params->get('page_title', '');
if (empty($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'));
}
}
}
PK w>\) views/.htaccessnu W+A
Order allow,deny
Deny from all
PK w>\a|
|
views/registration/view.html.phpnu W+A data = $this->get('Data');
$this->form = $this->get('Form');
$this->state = $this->get('State');
$this->params = $this->state->get('params');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode(' ', $errors));
return false;
}
// Check for layout override
$active = JFactory::getApplication()->getMenu()->getActive();
if (isset($active->query['layout'])) {
$this->setLayout($active->query['layout']);
}
//Escape strings for HTML output
$this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
$this->prepareDocument();
parent::display($tpl);
}
/**
* Prepares the document.
*
* @since 1.6
*/
protected function prepareDocument()
{
$app = JFactory::getApplication();
$menus = $app->getMenu();
$title = null;
// Because the application sets a default page title,
// we need to get it from the menu item itself
$menu = $menus->getActive();
if ($menu) {
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
} else {
$this->params->def('page_heading', JText::_('COM_USERS_REGISTRATION'));
}
$title = $this->params->get('page_title', '');
if (empty($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'));
}
}
}
PK w>\$ views/registration/metadata.xmlnu W+A
PK w>\) views/registration/.htaccessnu W+A
Order allow,deny
Deny from all
PK w>\
hA # views/registration/tmpl/default.phpnu W+A
params->get('show_page_heading')) : ?>
escape($this->params->get('page_heading')); ?>
PK w>\) ! views/registration/tmpl/.htaccessnu W+A
Order allow,deny
Deny from all
PK w>\BE E # views/registration/tmpl/default.xmlnu W+A
PK w>\y? $ views/registration/tmpl/complete.phpnu W+A
params->get('show_page_heading')) : ?>
escape($this->params->get('page_heading')); ?>
PK w>\V " views/registration/tmpl/index.htmlnu W+A
PK w>\V views/registration/index.htmlnu W+A
PK w>\ 7
7
views/remind/view.html.phpnu W+A form = $this->get('Form');
$this->state = $this->get('State');
$this->params = $this->state->params;
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode(' ', $errors));
return false;
}
// Check for layout override
$active = JFactory::getApplication()->getMenu()->getActive();
if (isset($active->query['layout'])) {
$this->setLayout($active->query['layout']);
}
//Escape strings for HTML output
$this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
$this->prepareDocument();
parent::display($tpl);
}
/**
* Prepares the document.
*
* @since 1.6
*/
protected function prepareDocument()
{
$app = JFactory::getApplication();
$menus = $app->getMenu();
$title = null;
// Because the application sets a default page title,
// we need to get it from the menu item itself
$menu = $menus->getActive();
if ($menu) {
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
} else {
$this->params->def('page_heading', JText::_('COM_USERS_REMIND'));
}
$title = $this->params->get('page_title', '');
if (empty($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'));
}
}
}
PK w>\v views/remind/metadata.xmlnu W+A
PK w>\V views/remind/tmpl/index.htmlnu W+A
PK w>\) views/remind/tmpl/.htaccessnu W+A
Order allow,deny
Deny from all
PK w>\N% views/remind/tmpl/default.phpnu W+A
params->get('show_page_heading')) : ?>
escape($this->params->get('page_heading')); ?>
PK w>\q>1 1 views/remind/tmpl/default.xmlnu W+A
PK w>\) views/remind/.htaccessnu W+A
Order allow,deny
Deny from all
PK w>\V views/remind/index.htmlnu W+A
PK w>\V views/profile/index.htmlnu W+A
PK w>\) views/profile/tmpl/.htaccessnu W+A
Order allow,deny
Deny from all
PK w>\
"l % views/profile/tmpl/default_custom.phpnu W+A form->getFieldsets();
if (isset($fieldsets['core'])) unset($fieldsets['core']);
if (isset($fieldsets['params'])) unset($fieldsets['params']);
foreach ($fieldsets as $group => $fieldset): // Iterate through the form fieldsets
$fields = $this->form->getFieldset($group);
if (count($fields)):
?>
PK w>\vs s % views/profile/tmpl/default_params.phpnu W+A
form->getFieldset('params'); ?>
PK w>\13 3 views/profile/tmpl/default.xmlnu W+A
PK w>\Ig:~ ~ views/profile/tmpl/default.phpnu W+A