create new tag
, view all tags

LdapPluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on LdapPlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Feedback on LdapPlugin

-- GerardHickey - 14 Jan 2002

This is great! It is a nice fit for the TWikiMission.

A small feedback: It would be more consistent to put parameter values in double quotes, i.e. %LDAP{uid="hickey" show="cn"}%. That way users do not need to wonder what the correct syntax is.

This can be parsed easily with TWiki::Func::extractNameValuePair().

-- PeterThoeny - 13 Jan 2002

I couldn't get this plugin to work, so I took Peter's advice and changed it to work with extractNameValuePair().

Then I took some more advice and came up with the attached zip file.

There are now Five options for the LDAP plugin:

  • host: LDAP host to query
  • base: LDAP Base
  • format: format of the output (fields are pulled form here (use $attribute and any other wiki formatting you'd like.)
  • filter: The actual search filter to send to the LDAP server
  • header: The header of the list.

It takes multiple attributes and returns multiple rows. If you return the multiple rows in a table format, it will sort just like tables do. If you just have one attribute and one row, then the format can be very simple and it'll work just fine.

If you put LISTFIELDS for the format parameter, you'll get a list of the valid fields.

All the parameters (except filter) can be defaulted using settings in the Plugin page.

If you install this it WILL break the existing (1.00) version of this Plugin. frown

It works great for me so far. I'm going to build some pages that list people by section here at work and see how well that works. I'd be glad of some feedback.

[My usage of the plugin has shown it to work correctly even with complex filters. It's a bit slow, though, so I'm trying not to use it for queries that return more than about 10 rows. Maybe switching to the callback method for processing returned data might help....]

I'll check into limit. (looks pretty easy) I'm not sure of the value of offset.

  • Reason for offset: Useful if you have a large dataset and want to return only 10 or so at a time. Set it to offset="URLPARAM{"offset"}" to pick up the offset from the URL; add previous | next links containing some SpreadSheetPlugin formula calculating the previous and next offset values. -- PeterThoeny - 25 Apr 2002

I e-mailed the original author, but his company address no longer works, so I suspect he no longer cares.

[Still no response from the author -- 06 May 2002 -- I'm going to post it on the plugin topic.]

Wanted! Feedback from someone who has run it

-- GeraldSkerbitz - 06 May 2002

Posting upgrades here in the dev section is the right thing to do if you are not the author. You can package this and post it on the plugin topic if you get the OK from the author.

I have not tried it but this plugin is useful. As for returning multiple records, I suggest to add a new header and format option for greatest flexibility, similar to the SEARCH variable (see FormattedSearch). That way you can format it into a table, a bullet list or any other format you want. The attributes could be coded as $name like $telephonenumber in the format string. Example table format: header="|*Name*|*Phone*|" format="|$name|$telephonenumber|"

So, above and other options that might be useful:

  • header to specify the header
  • format to specify the format of one record, with attributes names like $name
  • limit to limit the number of records
  • offset to specify from what record number to start with
  • order to sort the records by a certain attribute or last modified date
  • reverse to reverse the direction of the search

-- PeterThoeny - 23 Apr 2002

If you do not get a reply from the author within a week or so I suggest to replace the existing zip in LdapPlugin with your improved version.

-- PeterThoeny - 25 Apr 2002

I'm interested in using this plugin to connect to an Exchange Server, primarily for contact information. Given that I know very little about LDAP, and have no interest in learning about Exchange Server, could someone give me some pointers? Specifically, how do I figure out what to use for base and filter parameters to the plugin.

-- DaveAlsup - 21 Jun 2002

I've put together a small patch that adds a new parameter, "port", for connecting to ldap servers running on nonstandard ports. Where should I send this?

-- MilesEgan - 10 Jul 2002

Thank you for this great Plugin !

I made some lttle but usefull enhancements to LDAP plugin :

  • added LDAP photo extract / display.
  • added default FILTER definition : assigned on current TOPIC name translated into username, make easy to get a generic TOPIC to include in it's home page to display all wanted Wiki Users LDAP infos.
  • added possibilty to define error message in case no record is found (really usefull when use in javascript).
  • intended to work (also) well with TWikiLdapRegistration

I let you decide if this could be simply the new version of LdapPlugin ;-), this version is compatible, just added more features. Note I tested it also on Win32, with TWikiMiniWebServer, it's perfect !

-- PatrickNomblot - 26 Jun 2003

I'm testing your new version now Patrick, I'll let you know of any problems.

-- MartinCleaver - 08 Jul 2003

I discovered a bug in the LdapPlugin, but now I don't know which version to fix. Are a lot of people using the new jpegphoto version? Looking at the code, it seems like a reasonable addition to the plugin. I went ahead and used it in fixing this bug. (we don't have any photos, so I've disabled it in my local version)

The bug is that if you have l and loginExpirationTime as two LDAP fields, and l is resolved first, then the l in loginExpirationTime gets converted into the location. The fix is to sort the @fields array in reverse length order. Bad coding on my part, I used $a and $b, so they all have to be replaced with some other variables. I've done that and it works for me.

I'll attach it to this page and hope to hear yea or nay about moving it to the LdapPlugin page soon.

-- GeraldSkerbitz - 24 Oct 2003

This is real good work, this version (24 Oct 2003 - 15:49) works fine, congratulation !

-- PatrickNomblot - 13 Nov 2003

Ooops ! My idea of putting in hard coded the HTML tag for IMG is really not a good idea. I have no way to define width, height, border, align, alt elements. So, I have changed it so $jpegPhoto only gives back the relative path to the photo, so we just have to surround it by IMG tag in LDAP format.

-  $y="<IMG SRC=\"". TWiki::Func::getPubUrlPath()."/LdapPhotos/$jpegPhotoFile\" border=\"0\" ALIGN=\"MIDDLE\">";
+  $y=TWiki::Func::getPubUrlPath()."/LdapPhotos/$jpegPhotoFile";

I also added the possibility to define a default photo (for those who do not have one wink ). Here is the patch

I really think that this is better than actual hard coded img tag. Thank's to accept this little enhancement.

-- PatrickNomblot - 09 Dec 2003

That enhancement will break the photo usage for people. We need to make sure they know that before they upgrade. I also got a patch from Dietrich Kracht to make unicode work (for umlauts and such). I just uploaded it. If you get a chance to try it that would be cool! I also hid your patch since that coding should all be included in here.

-- GeraldSkerbitz - 13 Jan 2004

Patrick sent me a patch to allow the CGI parmeter ldapfilter to be set and passed to the LDAP call in the topic. I incorporated that in this last incarnation and I changed the code so you can set the default filter to something based on the TOPIC via the Preferences page. Let me know what this breaks. BTW is there a new way to do plugins that I'm not keeping up with? I don't have much time to read all the TWiki topics and mostly just follow a few plugins.

-- GeraldSkerbitz - 14 Jan 2004

I have a small problem with this neat plugin. We use the posixGroup objectclass for group management and some entries have the memberUid attribute more than once specified (for different users). How should I deal with this within this plugin? If I specify $memberUid in format more than once I see subsequently the same entry. Any help would be appreciated

-- WiktorWodecki - 01 Feb 2004

I find groups hard to deal with in Ldap. frown I will ponder how to deal with this. If you come up with some code, please let me know! I just uploaded another version. Deitrich corrected some documentation errors and I got rid of the identifiers for my situation. I also changed BaseDN to base everywhere. The documentation was wrong. So if you coded it so it worked, then it won't now. Dietrich would like it to be searchbase. I like just base. Other opinions?

-- GeraldSkerbitz - 02 Feb 2004

I emailed Wiktor and suggested this change:

<                               $y=$entry->get_value($x);
>                               $y = join ("<br>", $entry->get_value($x) );
> #                             $y=$entry->get_value($x);

I'd like to make it more flexible and configurable. To that end, I added the mvformat parameter (not in the attached version yet, but I'm testing it). It just says what you will split multi-values with.

Patrick has e-mailed me with some more ideas including an option to list which attributes should be multi-valued. Sometimes you only want the first one. I'm unsure how to handle it yet.

-- GeraldSkerbitz - 04 Feb 2004

Is the additional CPAN Dependency on Unicode::String really necessary? This hinders me running the latest plugin version on my companys TWiki. I will have to beg the sysadmins for installing the package. frown

Well, it would help me argumenting if, for example, it would be now much easier to set up LDAP (single sign on) authentication now, wouldn't it? wink (any help about that will be very welcome, this would eminently increase the internal acceptance, i guess)

-- FranzJosefSilli - 05 Feb 2004

It's only a couple of lines of code that require it. To try it without the unicode reomve line 25 which uses the Unicode and line 148 which does the conversion. I'm not sure how one would tie this in to authentication, but I do remember that being part of the original intention.... I'll have to look at that.

-- GeraldSkerbitz - 09 Feb 2004

Commented out line 25 and 148, now it works as expected. Thanks! (why use this conversion anyway? wink )
I'm looking forward to the day when our TWiki server authenticates via LDAP. Please have a deep look.

-- FranzJosefSilli - 11 Feb 2004

But you can have Twiki authenticate thru LDAP, assuming that your LDAP implementation is already being used for other authentication purposes. We do that here at Motorola. Apache is told to auth via LDAP and the credentials are then passed on to TWiki. Twiki then does it's internal login id<->Twikiname mapping. Works quite nicely and when LDAP passwords change this is reflected everywhere, including in TWiki.

Unless you weere making a general statement about your particular implementation of TWiki not using LDAP.

-- SteveRJones - 11 Feb 2004

Great! But how does the correct config (Apache & TWiki.cfg) look like?! I've tried to find the right source snippet anywhere on twiki.org. -- Hm. Maybe we should move this discussion over to Support web. I'm sure the community will help (either way). Thanks in advance (and sorry for the noice).

-- FranzJosefSilli - 12 Feb 2004

Franz, go ahead and post this to the support web. I'll add our cfg but you may also get other examples that may prove useful - to yourself and others.

-- SteveRJones - 12 Feb 2004

Question was posted and answered in LdapAuthenticationHowTo

-- SteveRJones - 05 Mar 2004

I'd like to move this plugin to the LdapPlugin page. Any problems with that anywhere? It's been running stable here for quite a while and I haven't heard from any of the other users that there are other outstanding issues nor problems with the way it is now.

-- GeraldSkerbitz - 25 Mar 2004

I thought I had done this but it was just pointed out to me that I had not. I've just uploaded a version of the Plugin with mvformat as an option to separate multiple values which now all print out. Patrick had suggested a tag to list which fields should be multiple, but I could not decide how to implement that. I think it's very inflexible to list them on the preferences page.The CGI processing still works on this one but it's not documented yet.

-- GeraldSkerbitz - 02 Apr 2004

Added order to this chaos. smile Okay I just added sort order to the plugin. The chaos remains. If you use a field that doesn't exist in your sort order, it'll just hang. This should be fixed.

-- GeraldSkerbitz - 05 Apr 2004

Bug found. Forgot to initialize the %rows hash. Didn't behave with two ldap queries on the same page.

-- GS

Thanks for the excellent plugin. I haven't upgraded since the jpegPhoto support was added, but I haven't seen any of the bugs mentioned above either wink

We run TWiki under ModPerl and have added connection pooling to the LdapPlugin via the ResourcePool package with good results (no timing data yet, but I'm working on it). Pooling makes less sense in a CGI environment so I'm wondering how much interest their might be in posting the pooling code hereQUESTION?

The pooling code could be made conditional either by detecting the execution environment (mod_perl versus CGI, etc) or by adding plugin settings and/or an optional attribute. I will be adding the plugin setting and optional attribute anyway, as it seems reasonable that we may not want to pool connections to all hosts being queried.

Also, I'm wondering if anyone has considered or done any work toward adding support to LdapPlugin to create/modify a directory entryQUESTION? This poses several issues with binding/authentication.

And finally, has anyone already developed a schema/objectClass that explicitly defines Wiki/TWiki attributesQUESTION? For example, a twikiTopicName attribute that could be added to any existing directory entry.


-- DougDouglass - 12 Apr 2004

I did some formatting and doc fixes on the Plugin topic which you can take back into the next release: XHTML fixes, Interwiki links instead of direct links (to avoid broken links when Plugin is installed), etc.

-- PeterThoeny - 13 Apr 2004

It would be nice, if the ldap_lookup sub in LdapPlugin.pm doesn't call TWiki::getRenderedVersion() on line 175. I would like to join two ldap lookups into a single table and this call of getRenderedVersion() makes them into two separate tables.
In example:

| *Manager* ||
%LDAP{host="sun-ds" base="dc=sun,dc=com" filter="employeenumber=98517" format="| <nop>$givenname <nop>$sn | <nop>$extensionphone |"}%| *Release engineers* ||
%LDAP{host="sun-ds" base="dc=sun,dc=com" filter="reportsto=98517" format="| <nop>$givenname <nop>$sn | <nop>$extensionphone |"}%

I've verified, that the topic get rendered properly (subject to my perception) in my instance of Feb 03 TWiki release, where I've commented-out the call of getRenderedVersion().

-- RudolfBalada - 09 Sep 2004

can't you stick a %TABLE% before that list and then they'll be merged?

-- WillNorris - 09 Sep 2004

%TABLE% is from TablePlugin, which is not installed on my site at the moment. Anyway I doubt the %TABLE% would join following HTML code of two properly rendered single-row tables into single table with two rows, what is IMHO expected output.

Example output of two LDAP searches:


Example what I expect to be properly rendered HTML code:


The used examples serve only the purpose of showing two single-row tables and one two-rows table. The code doesn't come from getRenderedVersion() function.

Let's seek correct solution, which (IMHO) is not in installing another plugin. My personal opinion is, that such a plugin, which do use "format", should not call getRenderedVersion() itself, but let this call be executed i.e. by the "view" script.

-- RudolfBalada - 13 Sep 2004

I just finished spending more time that I should have needed to find a bug in this Plugin under the Cairo release. The amount of time is attributable to my own problems, the bug is that the &TWiki::getRenderedVersion routine has been moved to &TWiki::Render::getRenderedVersion. Without an update this causes a very abrupt "Server Error" from the web server when it cannot find the subroutine.

-- BillShikrallah - 13 Sep 2004

I have the same error with &TWiki::getRenderedVersion - line 175 in LdapPlugin.pm. Whem I change the contents of line for &TWiki::Render::getRenderedVersion, the problem not more ocorred.

-- JarbasJunior - 27 Sep 2004

Hi. I'm having a problem running apache2 with "=PerlTaintCheck= on" (and some other option with -T enabled):

Software error:

Insecure dependency in connect while running with -T switch at /usr/lib/perl/5.8/IO/Socket.pm line 114.

I'm no Perl guru and this is troubling. I want to run mod_perl (and other perl stuff) with taint check on, but doing the easy thing (turning it off in the twiki vhost) is not a solution I would like to resort to.

Is there a patch or something? I'll also go see in the apache2 topics in the meantime.

-- EricCote - 15 Oct 2004

I'll comment on both the the prior comments.

  1. I have this line:
    $value=&TWiki::getRenderedVersion( $value );
    commented out and I haven't seen anything break. Am I missing someplace it breaks?
  2. The second one I don't get. I see -T on the /usr/bin/perl line in bin/view, so isn't TWiki always running in taint check mode?

I'll add that I fully intend to do benchmarking with PluginBenchmarkAddOn and I will be installing the TWikiRelease01Sep2004 version and making sure that this plugin works on my machine with it. I'll also re-release and include Peter's changes to the documentation page.

-- GeraldSkerbitz - 17 Nov 2004

well, it works now. can't recall what i did though at the moment; thanks for your time.

-- EricCote - 12 Feb 2005

Does anybody use this Plugin together with the DEVELOP-branch? It seems broken there, cause I get:

Can't use string ("LDAPPLUGIN_BASE") as a HASH ref while "strict refs" in use at /home/httpd/twiki/lib/TWiki/Prefs.pm line 196.

-- FranzJosefSilli - 08 Apr 2005

We need to be able to define what PORT the ldap service is listening... a LONG time ago someone mentioned a fix... was this incorperated?.. -- DaveAlsup - 21 Jun 2002

I've put together a small patch that adds a new parameter, "port", for connecting to ldap servers running on nonstandard ports. Where should I send this?

-- ToddGrayson - 14 Sep 2005

Submitted for your approval: LdapPlugin-v1.100, which includes a newly cleaned up algorithm for FIELDLIST (return all attributes), reindented source (no tabs), fixes for Dakar and "use strict," some debugging additions, etc. It also includes the "port" parameter, which was a simple fix.

-- JoanTouzet - 04 Oct 2005

One little diff that I'm not going to bother reuploading the zipfile for: To get rid of some uninitialized variable errors in apache errorlog, change line 117 to read:

    if( $cgi->param('ldapfilter') )

-- JoanTouzet - 04 Oct 2005

You rock (the update) - thanks!

-- ToddGrayson - 09 Oct 2005

How is the "port" parameter implemented in this update by the way?

-- ToddGrayson - 09 Oct 2005

oof - downloaded proper version - please disregard port quesiton... thanks

-- ToddGrayson - 19 Oct 2005

Hi, It seems to be a great plugin and I really need it because I want my twiki in my company be used also as a repository where users can have some informations about the others (phone numbers for ex.). Anyway, I have a problem because in my Windows 2003 Active Directory environement, accessing the LDAP is not possible with an anonymous account. Every time that I run a query in Twiki, I have a "No records found". Bugzilla have this functionality in terms of accessing an Active Directory structure with a username and password. It use (so I) ActivePerl Net-LDAP-Express module to work. Is there a patch or a way to add some authentification againts the Active Directory so I can get my data from there ? I am really not a perl programmer so I reallly need some advices and some help.

Any help will be greatly appreciated !

-- RomainPelissier - 19 Jan 2006

Our LDAP server is SSL (ldaps) and auth only. Also only LDAP v3 is supported. As result (as far as i can see) a bind using a specific uid/password ist required. These values should not be placed inside a wiki topic.

Due my perl knowledge is very limited - is there a help to change LdapPlugin.pm to accomplish this.

-- PetricFrank - 06 Feb 2006

If your company needs this, do you have a budget at your disposal, Petric?

Someone is always willing to help where there is a contract to make it worth their while.

-- MartinCleaver - 06 Feb 2006

No, i haven't budget at my disposal (except coding a little bit on my own).

I tweaked a little with LdapPlugin.pm (from 1.100, due i have TWiki 4.0 installed).

  1. Add the protocol to the server entry: ldaps://.... to variable HOST in LdapPlugin topic.
  2. Apply patch (LdapPlugin.pm.ldaps.diff) attached. Here i have hardcoded the login parameters. You have to customize it on your needs.
    There is for sure a better way to configure such things.

The code was inspired by the way bugzilla (2.20) does it.

Hope this helps.

-- PetricFrank - 06 Feb 2006

To the Plugin maintainer: This Plugin does not work in TWiki 4.0 as reported in EnablingLdapPluginWithError. It uses TWiki internal functions TWiki::Prefs::getPreferencesValue, TWiki::wikiToUserName, TWiki::getRenderedVersion. Please consider upgrading this Plugin so that it runs on Cairo and Dakar codebase. HandlingCairoDakarPluginDifferences has more.

-- PeterThoeny - 15 Feb 2006

I've attached an updated Perl module for Dakar. This version does only work with Dakar since it uses the new function TWiki::Func::registerTagHandler. A backport for Cairo is also available. I've ommited TWiki::getRenderedVersion since I'm not sure whether this function is actually needed. Also, would $theSession->{renderer}->getRenderedVersion($result) be the right replacement for TWiki::getRenderedVersion($result)? BTW, why does TWiki.pm only set LC_CTYPE but not LC_COLLATE? Perl's cmp function, which is called by sort in LdapPlugin, does only work as expected if LC_COLLATE is set.

-- AndreasVoegele - 26 Feb 2006

Thanks Andreas. How about packaging the Plugin and releasing on the LdapPlugin topic?

I think it should be easy to merge the Dakar and Cairo version into one after looking at the diffs.

On Locale setting, this should work:

if( $TWiki::cfg{UseLocale} || $TWiki::useLocale ) {

On registerTagHandler and commonTagsHandler, that can be done conditionally.

On $TWiki::cfg{Site}{CharSet}, a conditional test can do that to.

-- PeterThoeny - 27 Feb 2006

Looks like all returning results are ended with newline, even if there is one entry with one-valued attribue. I suggest it would be better to apply this patch (at least):

<         $rows{join('-', @sortfield{@keyfields})} .= $row . "\n";
>         my $tempkey = join('-', @sortfield{@keyfields});
>         $rows{$tempkey} .= "\n" if keys(%rows);
>         $rows{$tempkey} .= $row;

So newlines will be added only if there are more than one rows in result. Or maybe I'm mistaken, in such case correct me please.

-- NikitaSmirnov - 13 Apr 2006

I'll release an update soon. I suggest to remove the final newline just before $result is returned. I think we must be careful not to remove the newline if a table is output, i.e. if the format contains something like "| $attribute |". Is it safe to assume that tables will always have a header?

    # Remove the final newline if there's only one record and no header.
    chomp $result unless $max > 1 || $header;

Alternatively, we could unconditionally remove the final newline. That change might affect existing pages but at least the newline would be removed consistently.

-- AndreasVoegele - 19 Apr 2006

I have a problem with :

...uninitialized value in substitution (s///) LdapPlugin.pm, lines 120,121,122 <DATA> line 225.

view: Insecure dependency in connect while running with -T switch 
at path/Socket.pm line 114, <DATA> line 225.

[error] malformed header from script. Bad header=<pre>Insecure dependency in  "web page adress"....

where is problem ? Thanks

-- MartinWich - 26 Apr 2006

I am not familiar with this Plugin, but a good start is to search the Support web for "Insecure dependency in connect".

-- PeterThoeny - 27 Apr 2006

I've released an update which addresses the bugs mentioned above. The final newline is now always removed from the result. The plugin also checks that the ldapfilter CGI argument is actually defined. The plugin now requires Perl 5.8, which was released four years ago. If you're stuck with an older Perl version you'll have to remove all references to the Encode module from the plugin.

-- AndreasVoegele - 13 May 2006

You can set a DN and password for binding now. Beneath line 202:

$mesg = $ldap->bind(); # bind anonymously
is a similar line, commented out:
#$mesg = $ldap->bind('dn', password => 'secret');
Comment out the anonymous binding line, uncomment the next line, and put your LDAP Bind DN and password for dn and secret.

If you don't know what these are, you need to talk to the administrator of your LDAP server, which may be the administrator of Microsoft Active Directory.

-- AndrewBanks - 12 Jun 2006

Q: Is it possibel to do bind to LDAP server that requires authentication?

-- VladimirJirasek - 12 Jun 2006

MichaelDaum posted a new LdapNgPlugin which - what it looks like - enhances (replaces?) this Plugin.

-- PeterThoeny - 19 Jul 2006

I really appreciate this plugin, but I have one thing that is driving me nuts. I'm trying to use it to create a dynamic staff directory, complete with pictures. If you look at my script below you will see how it generates a list. The problem is the jpegPhoto part. It creates a jpeg file in the default directory but it overwrites the same file until it gets to the end. Then when to goes to display the pictures it shows the same picture for everyone. I would like for the file name to be the cn, or user specified to avoid this problem. Can anyone advise on how to alter the LdapPlugin.pm until this feature is added. Here's my script:

%LDAP{host="ldaps://" base="ou=people,dc=my,dc=companies,dc=ldap,dc=server" jpegphoto="jpegPhoto" order="sn,givenName" filter="(uidNumber=999)" format="<table border=1><tr><td width=90><img src=\"$jpegPhoto\" width=\"100\" /></td> <td valign=top align=left> *$sn*, *$givenName* <br /> *Title:* $title<br /> *Phone:* $telephonenumber<br /> *Mobile:* $mobile<br /> *Fax#:* $facsimileTelephoneNumber</td></tr><tr><td colspan=2> *EMail:* $mail <br /> *Primary Office Location:* $physicalDeliveryOfficeName<br/> *Home Phone#:* $homePhone<br /> *Address:* <br />$postalAddress<br />$o<br />$street<br />$l, $st  $postalCode<br /></td></tr><tr><td colspan=2> *Job Description:* $description</td></tr></table><br />"}%

-- MontanaQuiring - 19 Jan 2007

ha. smile I'm quite proud of myself for this one. I'm a newb when it comes to PHP, but after a long time of trying to do something complicated I just did something simple. I added this line:

$file .= $i;
after line 264:
$file = $theTopic unless $file;
This creates files with an incrementing number in them, so that they are unique.

-- MontanaQuiring - 19 Jan 2007

Sorry I meant Perl, not PHP.

-- MontanaQuiring - 19 Jan 2007

Good to see an I18N enabled plugin - wasn't aware of this. If anyone else is doing any plugin work using I18N, it would be good to comment on the InternationalisationGuidelines in case you find bugs or missing features. Someone else has raised the issue of not setting LC_COLLATE, which looks like a bug in the TWiki core.

-- RichardDonkin - 23 Feb 2007

I've released a minor update. The search filter is now converted to UTF-8 before the filter is passed to LDAP. There are three new settings: reverse, skip, and limit, which can be used to reverse the sort order and to limit the number of records that are displayed. I've also added a link to TWiki:Plugins.LdapNgPlugin.

-- AndreasVoegele - 11 Jul 2007

I extracted the $manager AD attribute for a specific user, however it populates is as a full ldap path of manager, whats the best way to parse that string to extract only the name of the manager?

-- DejanTolj - 01 Aug 2008

it may be late to anwser this one, but I've extracted the managers name like this:

format="$percntCALC{$FILTER($commaOU=WHATEVER$commaOU=WHATEVER$commaDC=WHATEVER$commaDC=WHATEVER$commaDC=WHATEVER, $FILTER(CN=, $manager))}$percnt"

Change WHATEVER to your values.

-- Csaba Szilveszter - 2013-11-20

Patch posted by MauroFasolo at TWikibug:Item7395 with bug fix.

-- Peter Thoeny - 2013-12-06

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip LdapPlugin-1.1.zip r1 manage 36.2 K 2005-10-06 - 17:40 YuriNovik Original GeraldSkerbitz's version + better LDAP v.3 support.
TWiki::convertUtf8toSiteCharset() implementation
Compressed Zip archivezip LdapPlugin-1.100.zip r1 manage 7.4 K 2005-10-04 - 02:10 JoanTouzet Reindented without tabs; fixes for Dakar, use strict, new attribute gathering algorithm
Unknown file formatdiff LdapPlugin.pm.ldaps.diff r1 manage 0.7 K 2006-02-06 - 13:42 PetricFrank 'Hacked' patch to support ldaps. Based on v1.100
Edit | Attach | Watch | Print version | History: r82 < r81 < r80 < r79 < r78 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r82 - 2013-12-06 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.