diff --git a/lib/imap.php b/lib/imap.php index c48fba6..a7ff093 100644 --- a/lib/imap.php +++ b/lib/imap.php @@ -98,9 +98,9 @@ public function checkPassword($uid, $password) { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'CAPABILITY'); $canconnect = curl_exec($ch); + curl_close($ch); if($canconnect) { - curl_close($ch); $uid = mb_strtolower($uid); $this->storeUser($uid, $groups); return $uid; @@ -111,8 +111,6 @@ public function checkPassword($uid, $password) { ); } - curl_close($ch); - return false; } }