From a7b542ead003be2e64b6ebe294bb032bd84195e7 Mon Sep 17 00:00:00 2001 From: Alexander Vassilevski Date: Sun, 21 Feb 2021 18:58:13 -0800 Subject: [PATCH] fixing error msgs and ensuring return status; --- lib/Hooks/UserHooks.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Hooks/UserHooks.php b/lib/Hooks/UserHooks.php index 8f15d4b..8cb4888 100644 --- a/lib/Hooks/UserHooks.php +++ b/lib/Hooks/UserHooks.php @@ -74,7 +74,7 @@ class UserHooks { $this->logger->warning( "Updated glesys password for account: " . $email, $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) { @@ -169,8 +169,11 @@ class UserHooks { curl_close($ch); $xml = simplexml_load_string($result); $code = $xml->status->code; - if ($code != 200) + if ($code != 200){ $this->logger->warning( "Error: non-200 status: " . $xml->status->text); + return false; + } + return true; } }