[TYPO3-dev] fe_group of the logged user

Franz Holzinger franz at fholzinger.com
Sun May 21 21:06:04 CEST 2006


> 
> I don't know exactly if this list was created to talk about how to
> create extension or to talk about the core of the typo3.
> 
> But I ghave a new question for an extension.
> How can I obtain the group of the logged user?
> 

This code snippets will help you: (taken from tt_products)


$TSFE->fe_user->groupData->title


	function isUserInGroup($feuser, $group)
	{
		$groups = explode(',', $feuser['usergroup']);
		foreach ($groups as $singlegroup)
			if ($singlegroup == $group)
				return true;
		return false;
	} // isUserInGroup


$this->fe_users->isUserInGroup($TSFE->fe_user->user,
$val['visibleForGroupID'])


Greets,

Franz






More information about the TYPO3-dev mailing list