english/administrator/components/com_users/controllers/config.php
/**
	 * Method to export the configuration via download.
	 *
	 * @return	void
	 * @since	1.0
	 */
Method to export the configuration via download.
Method to export the configuration via download .
public function export()
	{
		JRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
		$app	= JFactory::getApplication();
		$config = JComponentHelper::getParams('com_users');
		$string	= (string)$config;
		header('Content-type: application/force-download');
		header('Content-Transfer-Encoding: Binary');
		header('Content-length: '.strlen($string));
		header('Content-disposition: attachment; filename="users.config.ini"');
		header('Pragma: no-cache');
		header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
		header('Expires: 0');
		echo $string;
		$app->close();
	}
public function export ( ) { JRequest :: checkToken ( ) or jexit ( JText :: _ ( 'JINVALID_TOKEN' ) ) ; $ app = JFactory :: getApplication ( ) ; $ config = JComponentHelper :: getParams ( 'com_users' ) ; $ string = ( string ) $ config ; header ( 'Content-type: application/force-download' ) ; header ( 'Content-Transfer-Encoding: Binary' ) ; header ( 'Content-length: ' . strlen ( $ string ) ) ; header ( 'Content-disposition: attachment; filename="users.config.ini"' ) ; header ( 'Pragma: no-cache' ) ; header ( 'Cache-Control: must-revalidate, post-check=0, pre-check=0' ) ; header ( 'Expires: 0' ) ; echo $ string ; $ app -> close ( ) ; }
Method to export the configuration via download.
Method to export the configuration via download .
// Check for request forgeries. // Get the component configuration values. // Send file headers. // Print the configuration values.