Location: PHPKode > projects > Anahita Social Engine > site/views/account/html.php
<?php
/**
 * @version		1.0.0
 * @category	Anahita Social Engine™
 * @copyright	Copyright (C) 2008 - 2010 rmdStudio Inc. and Peerglobe Technology Inc. All rights reserved.
 * @license		GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
 * @link     	http://www.anahitapolis.com
 */

class ComSocialengineViewAccountHtml extends ComSocialengineViewHtml
{

	public function __construct(array $options = array())
	{
		parent::__construct($options);
	}
	
	protected function prepareDefaultLayout()
	{
		$header = KFactory::get('lib.anahita.uikit.header.page')->setTitle(JText::_('AN-SE-ACCOUNT-HEADER'));	
		$this->assign('header', $header);
	}
	
	protected function prepareAccountLayout()
	{
		$this->preparePersonData();
	}
	
	protected function prepareEditLayout()
	{
		$this->preparePersonData();
	}
	
	private function preparePersonData()
	{
		global $mainframe;
		
		$user = KFactory::get('lib.joomla.user');
		
		$viewer = AnModelAnahita::getSessionViewer();
		
		$params 		= &$mainframe->getParams();
		
		$usersConfig 	= &JComponentHelper::getParams( 'com_users' );
		$check = $usersConfig->get('frontend_userparams');

		if ($check == '1' || $check == 1 || $check == NULL)
			if($user->authorize( 'com_user', 'edit' ))
				$params		= $user->getParameters(true);
				
		$params->merge( $params );
		
		$this->assign('user', 			$user);
		$this->assign('personInfo', 	$viewer->information);
		$this->assign('params',			$params);
		$this->assign('canEditParams',	$user->authorize( 'com_user', 'edit' ));
	}
	
//end class	
}
Return current item: Anahita Social Engine