- md5
- 8e848492e192f8c15078deaae5a0b55e
- sha1
- 97fdaafda4288e2563ce4781b1083981fa37edd9
- sha256
- ef0f325f990bb955eb31452e5409f4c8b26a891595f0b1daf3bec6a09fa45865
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
<?php
/**
* @version $Id: remind.php 22338 2011-11-04 17:24:53Z github_bot $
* @package Joomla.Site
* @subpackage com_users
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
require_once JPATH_COMPONENT.'/controller.php';
/**
* Reset controller class for Users.
*
* @package Joomla.Site
* @subpackage com_users
* @version 1.6
*/
class UsersControllerRemind extends UsersController
{
/**
* Method to request a username reminder.
*
* @since 1.6
*/
public function remind()
{
// Check the request token.
JRequest::checkToken('post') or jexit(JText::_('JINVALID_TOKEN'));
$app = JFactory::getApplication();
$model = $this->getModel('Remind', 'UsersModel');
$data = JRequest::getVar('jform', array(), 'post', 'array');
// Submit the password reset request.
$return = $model->processRemindRequest($data);
// Check for a hard error.
if ($return == false) {
// The request failed.
// Get the route to the next page.
$itemid = UsersHelperRoute::getRemindRoute();
$itemid = $itemid !== null ? '&Itemid='.$itemid : '';
$route = 'index.php?option=com_users&view=remind'.$itemid;
// Go back to the request form.
$message = JText::sprintf('COM_USERS_REMIND_REQUEST_FAILED', $model->getError());
$this->setRedirect(JRoute::_($route, false), $message, 'notice');
return false;
} else {
// The request succeeded.
// Get the route to the next page.
$itemid = UsersHelperRoute::getRemindRoute();
$itemid = $itemid !== null ? '&Itemid='.$itemid : '';
$route = 'index.php?option=com_users&view=login'.$itemid;
// Proceed to step two.
$message = JText::_('COM_USERS_REMIND_REQUEST_SUCCESS');
$this->setRedirect(JRoute::_($route, false), $message);
return true;
}
}
}
The same content is in 3 releases, Joomla 1.7.3 to 1.7.5. See them all, or every version of this file.