src/Factory.php
public static function &getUser($instance)
	{
		static $instances;
		if (!isset($instances)) {
			$instances = array();
		}
		//only create a new user instance if it has not been created before
		if (!isset($instances[$instance])) {
			$name = static::getNameFromInstance($instance);

			static::pluginAutoLoad($name);

			$class = '\JFusion\Plugins\\' . $name . '\User';
			if (!class_exists($class)) {
				$class = '\JFusion\Plugin\User';
			}
			$instances[$instance] = new $class($instance);
		}
		return $instances[$instance];
	}
public static function &getUser($instance)
	{
		static $instances;
		if (!isset($instances)) {
			$instances = array();
		}
		//only create a new user instance if it has not been created before
		if (!isset($instances[$instance])) {
			$name = static::getNameFromInstance($instance);

			static::pluginAutoLoad($name);

			$class = '\JFusion\Plugins\\' . $name . '\User';
			if (!class_exists($class)) {
				$class = '\JFusion\Plugin\User';
			}
			$instances[$instance] = new $class($instance);
		}
		return $instances[$instance];
	}
public static function & getUser ( $ instance ) { static $ instances ; if ( ! isset ( $ instances ) ) { $ instances = array ( ) ; } //only create a new user instance if it has not been created before if ( ! isset ( $ instances [ $ instance ] ) ) { $ name = static :: getNameFromInstance ( $ instance ) ; static :: pluginAutoLoad ( $ name ) ; $ class = '\JFusion\Plugins\\' . $ name . '\User' ; if ( ! class_exists ( $ class ) ) { $ class = '\JFusion\Plugin\User' ; } $ instances [ $ instance ] = new $ class ( $ instance ) ; } return $ instances [ $ instance ] ; }
Gets an User Class for the JFusion Plugin

@param string $instance name of the JFusion plugin used

@return User JFusion User class for the JFusion plugin
Gets an User Class for the JFusion Plugin