CoreFiles by mySites.guru
mail.php43 lines, 1,052 bytes, from Joomla_1.7.2-Stable-Full_Package.zip
Raw History Compare with 1.7.1
md5
e561883e5a7135c8c72fd6ae223d6e37
sha1
9465adfcd5f2001ecf3df18e8008795db50f9d8c
sha256
76b3e7b296c28ca141d9029a7a015c440c3fdae7f7f020445bc7c71c1c66eb56
<?php
/**
 * @version		$Id: mail.php 20196 2011-01-09 02:40:25Z ian $
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
 */

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die;

jimport('joomla.application.component.controller');

/**
 * Users mail controller.
 *
 * @package		Joomla.Administrator
 * @subpackage	com_users
 */
class UsersControllerMail extends JController
{
	public function send()
	{
		// Check for request forgeries.
		JRequest::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.
		JRequest::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));
		$this->setRedirect('index.php');
	}
}

The same content is in 13 releases, Joomla 1.6.0 to 1.7.5. See them all, or every version of this file.