public function getUserIdFromSessionId($sessionId)
	{
		$database = \App::get('db');

		// get session timeout period
		$timeout = \App::get('config')->get('timeout');

		// load user from session table
		$sql = "SELECT userid 
				  FROM `#__session`
				  WHERE `session_id`=" . $database->quote($sessionId) . "
				  AND time + " . (int) $timeout . " <= NOW();";
				//  AND client_id = 0;";
		$database->setQuery($sql);
		return $database->loadResult();
	}
public function getUserIdFromSessionId($sessionId)
	{
		$database = \App::get('db');

		// get session timeout period
		$timeout = \App::get('config')->get('timeout');

		// load user from session table
		$sql = "SELECT userid 
				  FROM `#__session`
				  WHERE `session_id`=" . $database->quote($sessionId) . "
				  AND time + " . (int) $timeout . " <= NOW();";
				//  AND client_id = 0;";
		$database->setQuery($sql);
		return $database->loadResult();
	}
public function getUserIdFromSessionId ( $ sessionId ) { $ database = \ App :: get ( 'db' ) ; // get session timeout period $ timeout = \ App :: get ( 'config' ) -> get ( 'timeout' ) ; // load user from session table $ sql = "SELECT userid 
				  FROM `#__session`
				  WHERE `session_id`=" . $ database -> quote ( $ sessionId ) . "
				  AND time + " . ( int ) $ timeout . " <= NOW();" ; //  AND client_id = 0;"; $ database -> setQuery ( $ sql ) ; return $ database -> loadResult ( ) ; }
Get user id via session id

@param   string  $sessionId  Session identifier
@return  int     User identifier
Get user id via session id