public static function signInAs($username)
	{
		$ip = self::getClientIp();
		$ua = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? $_SERVER['HTTP_USER_AGENT'] : '';
		$ts = date("U");
		$cu = self::getCurrentUsername();

		self::sessionWrite( array( 'username' => $username ) );
		self::reload();

		self::log( 'signinas ' . $username , $cu, $ts , $ip , $ua );
		self::save();

		return self::$auth['users'][ $username ];
	}
public static function signInAs($username)
	{
		$ip = self::getClientIp();
		$ua = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? $_SERVER['HTTP_USER_AGENT'] : '';
		$ts = date("U");
		$cu = self::getCurrentUsername();

		self::sessionWrite( array( 'username' => $username ) );
		self::reload();

		self::log( 'signinas ' . $username , $cu, $ts , $ip , $ua );
		self::save();

		return self::$auth['users'][ $username ];
	}
public static function signInAs ( $ username ) { $ ip = self :: getClientIp ( ) ; $ ua = ( isset ( $ _SERVER [ 'HTTP_USER_AGENT' ] ) ) ? $ _SERVER [ 'HTTP_USER_AGENT' ] : '' ; $ ts = date ( "U" ) ; $ cu = self :: getCurrentUsername ( ) ; self :: sessionWrite ( array ( 'username' => $ username ) ) ; self :: reload ( ) ; self :: log ( 'signinas ' . $ username , $ cu , $ ts , $ ip , $ ua ) ; self :: save ( ) ; return self :: $ auth [ 'users' ] [ $ username ] ; }
Sign in as a user

@param string $username the user to sign in

@return array the user informations or false if failed
Sign in as a user