Implement LDAP email substitution.

https://www.pivotaltracker.com/story/show/76474212
Details in the story and commit for docs