Verifying login data can fail for a number of reasons like temporary
connection failure to the IMAP server, Internal problems of the IMAP
server, or actually wrong username / password combination.
This change logs the reason for login failures, helping server admins to
diagnose login problems and better support their users.
Ideally, we would have an option to pass the reason upwards, so the
NextCloud login system can show appropriate errors to users attempting
to login.
Signed-off-by: Bjoern Kahl <mls@bjoern-kahl.de>
The IMAP method allows user names with or without a domain part. For
user names without a domain part, it still tries to access the (then
non-existing) domain, resulting in "Error: Undefined array key 1 at
.../nextcloud/apps/user_external/lib/IMAP.php#85" log messages.
Signed-off-by: Bjoern Kahl <mls@bjoern-kahl.de>
Signed-off-by: Tem Ogunfiditimi <tem@episof.com>
Changed comparison to identical check
Signed-off-by: Tem Ogunfiditmi <tem@episof.com>
Signed-off-by: Tem Ogunfiditimi <tem@episof.com>