nextcloud / user_external

👥 External user authentication methods like IMAP, SMB and FTP
https://apps.nextcloud.com/apps/user_external
107 stars 64 forks source link

Only do one curl_close #174

Closed brknkfr closed 2 years ago

brknkfr commented 3 years ago

Fixes #172

violoncelloCH commented 3 years ago

thanks for the PR! I'm just wondering why you did not simply leave the close statement on line 114 (instead of moving it to the top)?

brknkfr commented 3 years ago

I'm just wondering why you did not simply leave the close statement on line 114 (instead of moving it to the top)?

I just thought that the open curl session is not needed anymore after saving the response code it to the variable $canconnect, so why not closing it just right after.

But it fact, it doesn't matter. For readability it would be maybe better to leave curl_close on line 114.

violoncelloCH commented 2 years ago

yes, let's leave it at the bottom, but only once after the if statement