public function Account::testConnection in GatherContent 7.3
Test connection with current credentials.
Return value
bool Return TRUE on success connection otherwise FALSE.
File
- includes/
Account.inc, line 96 - Contains GatherContent\Accont class.
Class
- Account
- Class Account.
Namespace
GatherContentCode
public function testConnection() {
try {
$response = $this->client
->get('/me');
if ($response
->getStatusCode() === 200) {
return TRUE;
}
else {
return FALSE;
}
} catch (\Exception $e) {
return FALSE;
}
}