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

		if( TYPO3_MODE === 'FE' && $GLOBALS['TSFE']->loginUser == 1 )
		{
			$context->setUserId( $GLOBALS['TSFE']->fe_user->user[$GLOBALS['TSFE']->fe_user->userid_column] );
			$context->setEditor( $GLOBALS['TSFE']->fe_user->user['username'] );
		}
		elseif( TYPO3_MODE === 'BE' && isset( $GLOBALS['BE_USER']->user['username'] ) )
		{
			$context->setEditor( $GLOBALS['BE_USER']->user['username'] );
		}
		else
		{
			$context->setEditor( GeneralUtility::getIndpEnv( 'REMOTE_ADDR' ) );
		}

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

		if( TYPO3_MODE === 'FE' && $GLOBALS['TSFE']->loginUser == 1 )
		{
			$context->setUserId( $GLOBALS['TSFE']->fe_user->user[$GLOBALS['TSFE']->fe_user->userid_column] );
			$context->setEditor( $GLOBALS['TSFE']->fe_user->user['username'] );
		}
		elseif( TYPO3_MODE === 'BE' && isset( $GLOBALS['BE_USER']->user['username'] ) )
		{
			$context->setEditor( $GLOBALS['BE_USER']->user['username'] );
		}
		else
		{
			$context->setEditor( GeneralUtility::getIndpEnv( 'REMOTE_ADDR' ) );
		}

		return $context;
	}
protected static function addUser ( \ Aimeos \ MShop \ Context \ Item \ Iface $ context ) { if ( isset ( $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXTCONF' ] [ 'aimeos' ] [ 'aimeos_context_user' ] ) && is_callable ( ( $ fcn = $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXTCONF' ] [ 'aimeos' ] [ 'aimeos_context_user' ] ) ) ) { return $ fcn ( $ context ) ; } if ( TYPO3_MODE === 'FE' && $ GLOBALS [ 'TSFE' ] -> loginUser == 1 ) { $ context -> setUserId ( $ GLOBALS [ 'TSFE' ] -> fe_user -> user [ $ GLOBALS [ 'TSFE' ] -> fe_user -> userid_column ] ) ; $ context -> setEditor ( $ GLOBALS [ 'TSFE' ] -> fe_user -> user [ 'username' ] ) ; } elseif ( TYPO3_MODE === 'BE' && isset ( $ GLOBALS [ 'BE_USER' ] -> user [ 'username' ] ) ) { $ context -> setEditor ( $ GLOBALS [ 'BE_USER' ] -> user [ 'username' ] ) ; } else { $ context -> setEditor ( GeneralUtility :: getIndpEnv ( 'REMOTE_ADDR' ) ) ; } return $ context ; }
Adds the user ID and editor name to the context

@param \Aimeos\MShop\Context\Item\Iface $context Context object
@return \Aimeos\MShop\Context\Item\Iface Modified context object
Adds the user ID and editor name to the context