Gentlemen,
I'm not PHP savvy and I spent several days trying to come up with a solution, but after trying all I can and looking around in scripts, I decided to get expert help.
We have Microsoft AD. Moodle 3.3 ldap authentication and users sync work like a charm. I can have users created automatically and they sign in with no problems.
However, since we use Exchange 365 and "mail" ldap attibute is not populated in our AD, I've been wondering how to fill out the user e-mail field with a formula concatenating samaccountname and @domainname.com.
Tried also creating a custom field but I was not able to make it work.
thank you!