Adrian, Have you look at the already present LDAPPlugin ? It should allow to search in an LDAP directory, without you even writing a plugin. Ludovic Adrian Hall a écrit :
(Apologies to those who got clobbered by my out of date Digital ID – I will not sign messages to the group any more – re-post)
Does anyone have a more extensive Wiki plug-in example?
I’m needing to do an LDAP directory application, and I’m lazy, so I don’t want to do the whole UI. So I figure I can create an LDAP search plug-in that does:
$results = $xwiki.ldapsearch.search(“ldap://ldap.example.com:389/o=Top??sub?(cn=${text})”)
Foreach ($result in $results)
$record = $xwiki.ldapsearch.get($result)
{$record.get(“cn”)}
End
… or something like that – anyhow. The idea is to create a list of names, phone numbers, etc. that match the search criteria.
Unfortunately, the example “hello world” plug-in does not show off a collection, so if anyone has any pointers, I’d like to hear them.
Of course, if anyone has already done this, I’d definitely like to hear that too.
*Adrian Hall*
Sr. Product Line Manager
Technology Partnerships
[email protected] <mailto:[email protected]>
Ph: (408) 667-4977
MSN: [email protected]
Skype: adrianhall
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic