LDAPUserFolder Question
Hi, I have LDAPUserFolder 2.6 on Zope 2.9.5-Final. Everything is working as expected, but there is one thing I'm not clear on. I've added uid as User ID to the LDAP Schema, and am using it as the Login Name Attribute. The authentication works flawlessly. Under User ID Attribute I have Canonical Name (cn). That should be returning the full name of the user. However when I use something like: <dtml-call expr="REQUEST.set( 'User_Name',REQUEST.AUTHENTICATED_USER.getUserName())"> I get the uid and not the cn. Any idea how I can get the cn? Thanks, Sean
<dtml-call expr="REQUEST.set( 'User_Name',REQUEST.AUTHENTICATED_USER.getUserName())">
I get the uid and not the cn. Any idea how I can get the cn? Maybe: REQUEST.AUTHENTICATED_USER.getUserDN() ?
Take a look into LDAPUser.py -- Maciej Wisniowski
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 6 Jan 2007, at 00:42, Maciej Wisniowski wrote:
<dtml-call expr="REQUEST.set ( 'User_Name',REQUEST.AUTHENTICATED_USER.getUserName())">
I get the uid and not the cn. Any idea how I can get the cn? Maybe: REQUEST.AUTHENTICATED_USER.getUserDN() ?
Take a look into LDAPUser.py
getUserDN wont return the "cn" attribute, it will return the full distinguished name ;) You can use <user_object>.getProperty('cn'). jens -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFnuYlRAx5nvEhZLIRAiv6AKCmNcKbE1D1bRGCvaGwxBGMS5e9xACgspCj P5StEDSIobv5O62Cq/fi4OU= =ExJy -----END PGP SIGNATURE-----
participants (3)
-
Jens Vagelpohl -
Maciej Wisniowski -
Sean Duffy