Retrieve other fields from the LDAP database

31 views
Skip to first unread message

John Freking

unread,
Mar 20, 2017, 9:40:04 AM3/20/17
to web...@googlegroups.com
I have used LDAP login with MS Active Directory and I added the extra
fields for names and emails to the AUTH_USER table.

[ldap_auth(mode='ad',
manage_user=True,
user_firstname_attrib = 'givenName',
user_lastname_attrib = 'sn',
user_mail_attrib = 'mail',

This code works fine but I want to retrieve more fields from the LDAP
database. Is it possible to get more than these these fields?

Thanks,
John

Dave S

unread,
Mar 20, 2017, 4:44:59 PM3/20/17
to web2py-users




The book has a quick paragraph at
<URL:http://web2py.com/books/default/chapter/29/09/access-control#Other-login-methods-and-login-forms>

which refers to the "documentation in the file [webpydir]/gluon/contrib/login_methods/ldap_auth.py".
And it looks like if you scroll down to where manage_user is mentioned, you may get some help (around line #116 in the 2.14.6 stable version).

A quick google doesn't show an answer that's specific to your question; most of the ldap posts are about getting the connection to one or another type of service.

/dps

Reply all
Reply to author
Forward
0 new messages