ARC TWiki
>
TWiki Web
>
RenderLdapUser
(revision 1) (raw view)
Raw edit
|
Edit
Attach
---+!! <nop>%TOPIC% ---++ 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 <verbatim> %STARTINCLUDE% %~~ LDAP{"(&(objectClass=posixAccount)(uid=%KEY%))" ~~~ clear="$jpegPhoto,$cn,$mail,$telephoneNumber,$o,$postalAddress" ~~~ limit="1" ~~~ format=" ~~~ <div class=\"alt\"> ~~~ <table cellspacing=\"5\"> ~~~ <tr> ~~~ $percntIFDEFINEDTHEN{\"$jpegPhoto\" as=\"$[j]pegPhoto\"}$percnt ~~~ <td valign=\"top\"> ~~~ <img src=\"$jpegPhoto\" alt=\"$cn\" title=\"$cn\" width=\"100px\"> ~~~ </td> ~~~ $percntFIDEFINED$percnt ~~~ <td valign=\"top\"> ~~~ <table> ~~~ <tr><th valign=\"top\">Name:</th> ~~~ <td valign=\"top\"> $cn </td></tr> ~~~ <tr><th valign=\"top\">Email:</th> ~~~ <td valign=\"top\"> $mail </td></tr> ~~~ <tr><th valign=\"top\">Tel:</th> ~~~ <td valign=\"top\"> $telephoneNumber </td></tr> ~~~ <tr><th valign=\"top\">Organization:</th> ~~~ <td valign=\"top\"> $o </td></tr> ~~~ <tr><th valign=\"top\">Address:</th> ~~~ <td valign=\"top\"> $postalAddress </td></tr> ~~~ </table> ~~~ </td> ~~~ </tr> ~~~ </table> ~~~ </div>" ~~~ }% %STOPINCLUDE% </verbatim> ---++ Test %INCLUDE{"%TOPIC%" KEY="%USERNAME%"}%
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r1 - 2015-04-29
-
MichaelNaumann
TWiki
Log In
TWiki Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Webs
External
Main
Sandbox
TWiki
Copyright © 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
.