public function validateToolSessionData($toolSessionId, $toolSessionToken)
	{
		// include neede libs
		require_once PATH_CORE . DS . 'components' . DS . 'com_tools' . DS . 'helpers' . DS . 'utils.php';

		// instantiate middleware database
		$mwdb = \Components\Tools\Helpers\Utils::getMWDBO();

		// attempt to load session from db
		$query = "SELECT * 
				  FROM `session`
				  WHERE `sessnum`= " . $mwdb->quote($toolSessionId) . " 
				  AND `sesstoken`=" . $mwdb->quote($toolSessionToken);
		$mwdb->setQuery($query);

		// only continue if a valid session was found
		if (!$session = $mwdb->loadObject())
		{
			return false;
		}

		// return user id
		$profile = \Hubzero\User\User::oneByUsername($session->username);
		return $profile->get('id');
	}
public function validateToolSessionData($toolSessionId, $toolSessionToken)
	{
		// include neede libs
		require_once PATH_CORE . DS . 'components' . DS . 'com_tools' . DS . 'helpers' . DS . 'utils.php';

		// instantiate middleware database
		$mwdb = \Components\Tools\Helpers\Utils::getMWDBO();

		// attempt to load session from db
		$query = "SELECT * 
				  FROM `session`
				  WHERE `sessnum`= " . $mwdb->quote($toolSessionId) . " 
				  AND `sesstoken`=" . $mwdb->quote($toolSessionToken);
		$mwdb->setQuery($query);

		// only continue if a valid session was found
		if (!$session = $mwdb->loadObject())
		{
			return false;
		}

		// return user id
		$profile = \Hubzero\User\User::oneByUsername($session->username);
		return $profile->get('id');
	}
public function validateToolSessionData ( $ toolSessionId , $ toolSessionToken ) { // include neede libs require_once PATH_CORE . DS . 'components' . DS . 'com_tools' . DS . 'helpers' . DS . 'utils.php' ; // instantiate middleware database $ mwdb = \ Components \ Tools \ Helpers \ Utils :: getMWDBO ( ) ; // attempt to load session from db $ query = "SELECT * 
				  FROM `session`
				  WHERE `sessnum`= " . $ mwdb -> quote ( $ toolSessionId ) . " 
				  AND `sesstoken`=" . $ mwdb -> quote ( $ toolSessionToken ) ; $ mwdb -> setQuery ( $ query ) ; // only continue if a valid session was found if ( ! $ session = $ mwdb -> loadObject ( ) ) { return false ; } // return user id $ profile = \ Hubzero \ User \ User :: oneByUsername ( $ session -> username ) ; return $ profile -> get ( 'id' ) ; }
Validate tool session data

@param   string  $toolSessionId     Tool session id
@param   string  $toolSessionToken  Tool session token
@return  bool    Result of test
Validate tool session data