Source for file reset.php
Documentation is available at reset.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
require_once JPATH_COMPONENT.
'/controller.php';
* Reset controller class for Users.
* Method to request a password reset.
// Check the request token.
$model =
$this->getModel('Reset', 'UsersModel');
$data =
$this->input->post->get('jform', array(), 'array');
// Submit the password reset request.
$return =
$model->processResetRequest($data);
// Check for a hard error.
if ($return instanceof
Exception)
// Get the error message to display.
if ($app->getCfg('error_reporting'))
$message =
$return->getMessage();
$message =
JText::_('COM_USERS_RESET_REQUEST_ERROR');
// Get the route to the next page.
$itemid =
$itemid !==
null ?
'&Itemid='.
$itemid :
'';
$route =
'index.php?option=com_users&view=reset'.
$itemid;
// Go back to the request form.
} elseif ($return ===
false)
// Get the route to the next page.
$itemid =
$itemid !==
null ?
'&Itemid='.
$itemid :
'';
$route =
'index.php?option=com_users&view=reset'.
$itemid;
// Go back to the request form.
$message =
JText::sprintf('COM_USERS_RESET_REQUEST_FAILED', $model->getError());
// The request succeeded.
// Get the route to the next page.
$itemid =
$itemid !==
null ?
'&Itemid='.
$itemid :
'';
$route =
'index.php?option=com_users&view=reset&layout=confirm'.
$itemid;
* Method to confirm the password request.
// Check the request token.
$model =
$this->getModel('Reset', 'UsersModel');
$data =
$this->input->get('jform', array(), 'array');
// Confirm the password reset request.
$return =
$model->processResetConfirm($data);
// Check for a hard error.
if ($return instanceof
Exception)
// Get the error message to display.
if ($app->getCfg('error_reporting'))
$message =
$return->getMessage();
$message =
JText::_('COM_USERS_RESET_CONFIRM_ERROR');
// Get the route to the next page.
$itemid =
$itemid !==
null ?
'&Itemid='.
$itemid :
'';
$route =
'index.php?option=com_users&view=reset&layout=confirm'.
$itemid;
// Go back to the confirm form.
} elseif ($return ===
false)
// Get the route to the next page.
$itemid =
$itemid !==
null ?
'&Itemid='.
$itemid :
'';
$route =
'index.php?option=com_users&view=reset&layout=confirm'.
$itemid;
// Go back to the confirm form.
$message =
JText::sprintf('COM_USERS_RESET_CONFIRM_FAILED', $model->getError());
// Get the route to the next page.
$itemid =
$itemid !==
null ?
'&Itemid='.
$itemid :
'';
$route =
'index.php?option=com_users&view=reset&layout=complete'.
$itemid;
// Proceed to step three.
* Method to complete the password reset process.
// Check for request forgeries
$model =
$this->getModel('Reset', 'UsersModel');
$data =
$this->input->post->get('jform', array(), 'array');
// Complete the password reset request.
$return =
$model->processResetComplete($data);
// Check for a hard error.
if ($return instanceof
Exception)
// Get the error message to display.
if ($app->getCfg('error_reporting'))
$message =
$return->getMessage();
$message =
JText::_('COM_USERS_RESET_COMPLETE_ERROR');
// Get the route to the next page.
$itemid =
$itemid !==
null ?
'&Itemid='.
$itemid :
'';
$route =
'index.php?option=com_users&view=reset&layout=complete'.
$itemid;
// Go back to the complete form.
} elseif ($return ===
false)
// Get the route to the next page.
$itemid =
$itemid !==
null ?
'&Itemid='.
$itemid :
'';
$route =
'index.php?option=com_users&view=reset&layout=complete'.
$itemid;
// Go back to the complete form.
$message =
JText::sprintf('COM_USERS_RESET_COMPLETE_FAILED', $model->getError());
// Get the route to the next page.
$itemid =
$itemid !==
null ?
'&Itemid='.
$itemid :
'';
$route =
'index.php?option=com_users&view=login'.
$itemid;
// Proceed to the login form.
$message =
JText::_('COM_USERS_RESET_COMPLETE_SUCCESS');
Documentation generated on Tue, 19 Nov 2013 15:11:53 +0100 by phpDocumentor 1.4.3