[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Administrator 5 * @subpackage com_users 6 * 7 * @copyright (C) 2009 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\Administrator\Controller; 12 13 use Joomla\CMS\MVC\Controller\BaseController; 14 use Joomla\CMS\Router\Route; 15 16 // phpcs:disable PSR1.Files.SideEffects 17 \defined('_JEXEC') or die; 18 // phpcs:enable PSR1.Files.SideEffects 19 20 /** 21 * Users mail controller. 22 * 23 * @since 1.6 24 */ 25 class MailController extends BaseController 26 { 27 /** 28 * Send the mail 29 * 30 * @return void 31 * 32 * @since 1.6 33 */ 34 public function send() 35 { 36 // Redirect to admin index if mass mailer disabled in conf 37 if ($this->app->get('massmailoff', 0) == 1) { 38 $this->app->redirect(Route::_('index.php', false)); 39 } 40 41 // Check for request forgeries. 42 $this->checkToken('request'); 43 44 $model = $this->getModel('Mail'); 45 46 if ($model->send()) { 47 $type = 'message'; 48 } else { 49 $type = 'error'; 50 } 51 52 $msg = $model->getError(); 53 $this->setRedirect('index.php?option=com_users&view=mail', $msg, $type); 54 } 55 56 /** 57 * Cancel the mail 58 * 59 * @return void 60 * 61 * @since 1.6 62 */ 63 public function cancel() 64 { 65 // Check for request forgeries. 66 $this->checkToken('request'); 67 68 // Clear data from session. 69 $this->app->setUserState('com_users.display.mail.data', null); 70 71 $this->setRedirect('index.php?option=com_users&view=users'); 72 } 73 }
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 |