开发者

devise_ldap_authenticable - read ldap email from ldap profile

开发者 https://www.devze.com 2023-02-06 13:07 出处:网络
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

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") 
0

精彩评论

暂无评论...
验证码 换一张
取 消