Subject: | missing email address causes authenticate() to fail |
If authenticate() is called with an account that has no email address defined in AD, it fails with the following error:
Can't use an undefined value as an ARRAY reference at ... Dancer2/Plugin/Auth/ActiveDirectory.pm line 140.
A simple workaround:
mail => $_->get_value(q/mail/),
to
mail => ($_->get_value(q/mail/) or 'no.emailaddress@defined.com'),
My guess is that the same applies to any of the other fields that are used here; this is just the one I ran into this week.