This question about LDAP: Answered

RenderLdapUser not working

Hi All

I have been having a problem with the RenderLdapUser function - it's not populating the user page with anything. We are currently using AD via the LdapNgPlugin for authentication and that works fine, but the user pages aren't being populated with the details from AD.

The pages would populate with phone number, title, etc in Twiki, but after we upgraded to Foswiki the user pages are blank (just have the User Name @ Foswiki) at the top. When I go to the RenderLdapUser page, the Test doesn't show anything.

The page template holds the following code:

%SPACEOUT{"WilliamMorgan"}% @ %WIKITOOLNAME%

%INCLUDE{"%SYSTEMWEB%.RenderLdapUser" KEY="wmorgan"}%
<!--
   * Set ALLOWTOPICCHANGE = Users.WilliamMorgan
-->
Which I think is pretty standard. Everything looks OK... but not working!

-- WilliamMorgan - 12 Jul 2012

System.RenderLdapUser formerly was a part of NewUserPlugin, the extension responsible to create the user topics when they aren't existing yet.

The above code was the content of the System.NewLdapUserTemplate.

The newer NewUserPlugin replaced this approach with a VIEW_TEMPLATE setting in the System.NewLdapUserTemplate. The user view then implemented in System.LdapUserViewTemplate.

Note however, that this implementation makes some basic assumptions about the structure of your LDAP directory ... which isn't standardized at all. So you might need to modify this implementation to fit your needs.

Right now it contains an LDAP query of the form

%LDAP{
  "(uid=%USERINFO{"%BASETOPIC%" format="$username"}%)" 
  limit="1"
  format=" ... $mail ... $telephoneNumber ... $o ... $postalAddress"
}%

You will most likely have to change the attributes according to your LDAP configuration, e.g. Active Directory uses samAccountName instead of uid.

-- MichaelDaum - 12 Jul 2012
 

QuestionForm edit

Subject LDAP
Extension LdapContrib, NewUserPlugin
Version Foswiki 1.1.4
Status Answered
Related Topics
Topic revision: r2 - 12 Jul 2012, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy