ldap Authentication

ldap Authentication

by rob coles -
Number of replies: 4

Evening, 

We've been using Moodle for years with ldap authentication and working wonderfully,

However we'd like to be able to login with both username & email address but can't see anyway of doing it, both are mapped in ldap. 

We're constantly getting can't login because they tried logging in with email address rather than sam account name

Using Moodle 3.8.1+ 

Any ideas?


Many thanks


Rob


Average of ratings: -
In reply to rob coles

Re: ldap Authentication

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I have been able to have them log in with their email address...is the email showing in their moodle profile?  Is it possible that you have multiple accounts with the same email?

In reply to Emma Richardson

Re: ldap Authentication

by rob coles -

Email is showing in profile which is picked up from via LDAP


Can be done with manual or web registrations 

In reply to rob coles

Re: ldap Authentication

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Assuming you have "Allow log in via email" already enabled, it should work as long as the user already exists in Moodle and she has the email address already filled in. In other words, either the user has already logged in at least once using their username (and synced her email address from LDAP), or you have run the LDAP sync task and created the user (and synced her email address).

If the user doesn't already exist in Moodle and has the email address already filled in, Moodle can't link the email address to the username and can't perform the authentication successfully (the username field is what's really needed to perform the authentication)

I just setup Moodle with OpenLDAP to test it, and as long as you fullfil the above condition, it works as expected smile

Saludos.

Iñaki.

In reply to Iñaki Arenaza

Re: ldap Authentication

by rob coles -
I cleared ldap settings and tried again and for some reason works perfectly.

Can't really see any settings I've missed.

Thank you all for you support.

Regards

Rob