fixing error msgs and ensuring return status;

This commit is contained in:
Alexander Vassilevski 2021-02-21 18:58:13 -08:00
parent 14a6f49d58
commit a7b542ead0

View File

@ -74,7 +74,7 @@ class UserHooks {
$this->logger->warning( $this->logger->warning(
"Updated glesys password for account: " . $email, "Updated glesys password for account: " . $email,
$this->logContext); $this->logContext);
else $this->logger->error("Error deleting mail account" . $uid); else $this->logger->error("Error updating mail password for account" . $uid);
}; };
} }
private function createImapFolders($user_data) { private function createImapFolders($user_data) {
@ -169,8 +169,11 @@ class UserHooks {
curl_close($ch); curl_close($ch);
$xml = simplexml_load_string($result); $xml = simplexml_load_string($result);
$code = $xml->status->code; $code = $xml->status->code;
if ($code != 200) if ($code != 200){
$this->logger->warning( $this->logger->warning(
"Error: non-200 status: " . $xml->status->text); "Error: non-200 status: " . $xml->status->text);
return false;
}
return true;
} }
} }