Classes/Base/Context.php
protected static function addGroups( \Aimeos\MShop\Context\Item\Iface $context )
	{
		if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_groups'] )
			&& is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_groups'] ) )
		) {
			return $fcn( $context );
		}

		if( TYPO3_MODE === 'FE' && $GLOBALS['TSFE']->loginUser == 1 )
		{
			$ids = GeneralUtility::trimExplode( ',', $GLOBALS['TSFE']->fe_user->user['usergroup'] );
			$context->setGroupIds( $ids );
		}
		elseif( TYPO3_MODE === 'BE' && $GLOBALS['BE_USER']->userGroups )
		{
			$ids = array_keys( $GLOBALS['BE_USER']->userGroups );
			$context->setGroupIds( $ids );
		}

		return $context;
	}
protected static function addGroups( \Aimeos\MShop\Context\Item\Iface $context )
	{
		if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_groups'] )
			&& is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_groups'] ) )
		) {
			return $fcn( $context );
		}

		if( TYPO3_MODE === 'FE' && $GLOBALS['TSFE']->loginUser == 1 )
		{
			$ids = GeneralUtility::trimExplode( ',', $GLOBALS['TSFE']->fe_user->user['usergroup'] );
			$context->setGroupIds( $ids );
		}
		elseif( TYPO3_MODE === 'BE' && $GLOBALS['BE_USER']->userGroups )
		{
			$ids = array_keys( $GLOBALS['BE_USER']->userGroups );
			$context->setGroupIds( $ids );
		}

		return $context;
	}
protected static function addGroups ( \ Aimeos \ MShop \ Context \ Item \ Iface $ context ) { if ( isset ( $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXTCONF' ] [ 'aimeos' ] [ 'aimeos_context_groups' ] ) && is_callable ( ( $ fcn = $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXTCONF' ] [ 'aimeos' ] [ 'aimeos_context_groups' ] ) ) ) { return $ fcn ( $ context ) ; } if ( TYPO3_MODE === 'FE' && $ GLOBALS [ 'TSFE' ] -> loginUser == 1 ) { $ ids = GeneralUtility :: trimExplode ( ',' , $ GLOBALS [ 'TSFE' ] -> fe_user -> user [ 'usergroup' ] ) ; $ context -> setGroupIds ( $ ids ) ; } elseif ( TYPO3_MODE === 'BE' && $ GLOBALS [ 'BE_USER' ] -> userGroups ) { $ ids = array_keys ( $ GLOBALS [ 'BE_USER' ] -> userGroups ) ; $ context -> setGroupIds ( $ ids ) ; } return $ context ; }
Adds the group IDs to the context

@param \Aimeos\MShop\Context\Item\Iface $context Context object
@return \Aimeos\MShop\Context\Item\Iface Modified context object
Adds the group IDs to the context