email question

email question

by Andrew Wojtowicz -
Number of replies: 1
is there a way to change all of the email addresses in the user accounts with the database or something else?  Our email address is username@tenafly.k12.nj.us but our domain is something different, but when it reads ldap from AD it pulls a different email.  So i want to change the email addresses.
Average of ratings: -
In reply to Andrew Wojtowicz

Re: email question

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I don't understand why the LDAP emails should be wrong, but you don't have to pull in the email addresses from LDAP - just leave that option blank in the LDAP config screen.

As for changing all the addresses you have currently, I'm not sure what the SQL would be ... a short PHP script should be easy enough (read all the user records, use str_replace on them, write them back).