[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Site 5 * @subpackage com_users 6 * 7 * @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 namespace Joomla\Component\Users\Site\Controller; 12 13 use Joomla\CMS\Language\Text; 14 use Joomla\CMS\MVC\Controller\BaseController; 15 use Joomla\CMS\Router\Route; 16 17 // phpcs:disable PSR1.Files.SideEffects 18 \defined('_JEXEC') or die; 19 // phpcs:enable PSR1.Files.SideEffects 20 21 /** 22 * Reset controller class for Users. 23 * 24 * @since 1.6 25 */ 26 class RemindController extends BaseController 27 { 28 /** 29 * Method to request a username reminder. 30 * 31 * @return boolean 32 * 33 * @since 1.6 34 */ 35 public function remind() 36 { 37 // Check the request token. 38 $this->checkToken('post'); 39 40 /** @var \Joomla\Component\Users\Site\Model\RemindModel $model */ 41 $model = $this->getModel('Remind', 'Site'); 42 $data = $this->input->post->get('jform', array(), 'array'); 43 44 // Submit the password reset request. 45 $return = $model->processRemindRequest($data); 46 47 // Check for a hard error. 48 if ($return == false && JDEBUG) { 49 // The request failed. 50 // Go back to the request form. 51 $message = Text::sprintf('COM_USERS_REMIND_REQUEST_FAILED', $model->getError()); 52 $this->setRedirect(Route::_('index.php?option=com_users&view=remind', false), $message, 'notice'); 53 54 return false; 55 } 56 57 // To not expose if the user exists or not we send a generic message. 58 $message = Text::_('COM_USERS_REMIND_REQUEST'); 59 $this->setRedirect(Route::_('index.php?option=com_users&view=login', false), $message, 'notice'); 60 61 return true; 62 } 63 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |