I am using devise_ldap_authenticable and logging in using uid/username. I also have 'config.ldap_create_user = true' in config/initializers/devise.开发者_开发百科rb
Now when user logs in for the first time, user entry is created in database. But only username is captured in this entry. However, I would also like to have other details from ldap profile of user such as email address.
How do I do it?
i forked the project and created a method to query LDAP
https://github.com/noel/devise_ldap_authenticatable
used like this to query for the mail parameter
Devise::LdapAdapter.get_ldap_param(self.username,"mail")
精彩评论