RenderLdapUser

Description

Extract user information from an Ldap directory. Note, you have to install the TWiki:Plugins/LdapNgPlugin to make this work. Depending on your directory layout and the used schema you have to adjust the filter below.

Parameters

  • KEY: key used to fetc the user record, e.g. the login name

Implementation

%STARTINCLUDE%
%~~ LDAP{"(&(objectClass=posixAccount)(uid=%KEY%))" 
~~~   clear="$samaccountname,$displayname,$primarysmtpaddress,$telephonenumber,$physicaldeliveryofficename,$esogroup"
~~~   limit="1"
~~~   format="
~~~     <div class=\"alt\">
~~~     <table cellspacing=\"5\">
~~~     <tr>
~~~       $percntIFDEFINEDTHEN{\"$jpegPhoto\" as=\"$[j]pegPhoto\"}$percnt
~~~       <td valign=\"top\">
~~~         <img src=\"https://www.eso.org/images/staff/$samaccountname.jpg\" alt=\"$displayname\" title=\"$displayname\" width=\"100px\">
~~~       </td>
~~~       $percntFIDEFINED$percnt
~~~       <td valign=\"top\">
~~~         <table>
~~~           <tr><th valign=\"top\">Name:</th>
~~~               <td valign=\"top\"> $displayname</td></tr>
~~~           <tr><th valign=\"top\">Email:</th>
~~~               <td valign=\"top\"> $primarysmtpaddress</td></tr>
~~~           <tr><th valign=\"top\">Tel:</th>
~~~               <td valign=\"top\"> $telephoneNumber </td></tr>
~~~           <tr><th valign=\"top\">Office No.:</th>
~~~               <td valign=\"top\"> $physicaldeliveryofficename</td></tr>
~~~           <tr><th valign=\"top\">Group:</th>
~~~               <td valign=\"top\"> $group</td></tr>
~~~         </table>
~~~       </td>
~~~     </tr>
~~~    </table>
~~~    </div>"
~~~ }%
%STOPINCLUDE%

Test

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2015-04-29 - MichaelNaumann
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding ARC TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.RenderLdapUser.