Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Only do one curl_close
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian L committed Mar 18, 2021
1 parent 8a4e57b commit aae0692
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -111,8 +111,6 @@ public function checkPassword($uid, $password) {
);
}

curl_close($ch);

return false;
}
}

0 comments on commit aae0692

Please sign in to comment.