CoreFiles by mySites.guru
mail.php45 lines, 971 bytes, from Joomla_3.0.3-Stable-Full_Package.zip
Raw History Compare with 3.0.2
md5
17b330e25cda34cbb830c08bf70c523a
sha1
78a967ef8d092db7fcc513449b3b80f98e495bd0
sha256
455876cf6d894a7a8d36c39671ae743f30675d17245e6a3ee24a0ab85ac18fc0
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Users mail controller.
 *
 * @package     Joomla.Administrator
 * @subpackage  com_users
 */
class UsersControllerMail extends JControllerLegacy
{
	public function send()
	{
		// Check for request forgeries.
		JSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));

		$model = $this->getModel('Mail');
		if ($model->send())
		{
			$type = 'message';
		}
		else
		{
			$type = 'error';
		}

		$msg = $model->getError();
		$this->setredirect('index.php?option=com_users&view=mail', $msg, $type);
	}

	public function cancel()
	{
		// Check for request forgeries.
		JSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));
		$this->setRedirect('index.php');
	}
}

The same content is in 9 releases, Joomla 3.0.3 to 3.2.1. See them all, or every version of this file.