<?php
/**
 * [PHPFOX_HEADER]
 */

defined('PHPFOX') or exit('NO DICE!');

/**
 * 
 * 
 * @copyright		[PHPFOX_COPYRIGHT]
 * @author  		Raymond_Benc
 * @package 		Phpfox_Component
 * @version 		$Id: welcome.class.php 2817 2011-08-08 16:59:43Z Raymond_Benc $
 */
class User_Component_Block_Welcome extends Phpfox_Component
{
	/**
	 * Controller
	 */
	public function process()
	{
        $sWelcomeContent = flavor()->active->content();
        if (empty($sWelcomeContent) && !request()->get('force-flavor')){
            return false;
        }
		$this->template()->assign([
            'sWelcomeContent' => $sWelcomeContent
        ]);
        return null;
	}
	
	/**
	 * Garbage collector. Is executed after this class has completed
	 * its job and the template has also been displayed.
	 */
	public function clean()
	{
		(($sPlugin = Phpfox_Plugin::get('user.component_block_welcome_clean')) ? eval($sPlugin) : false);
	}
}