<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="home" title="HomePage" href="HomePage.html" />
<link rel="help" title="HowToUseWiki" href="HowToUseWiki.html" />
<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1" />
<link rel="author" title="The PhpWiki Programming Team" href="http://phpwiki.org/ThePhpWikiProgrammingTeam" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="en" />
<meta name="robots" content="noindex,nofollow" />
<meta name="language" content="en" />
<meta name="document-type" content="Public" />
<meta name="document-rating" content="General" />
<meta name="generator" content="PhpWiki" />
<meta name="PHPWIKI_VERSION" content="1.3.14" />

<base href="../" />
<link rel="stylesheet" type="text/css" charset="iso-8859-1" href="phpwiki-printer.css" />
<title>PhpWiki - Help  /  Ldap Search Plugin</title>
</head>
<body>

<div id="header">
  
<!-- Page title -->
<h1>Help  /  Ldap Search Plugin</h1>
</div>
<div id="content">



<div class="wikitext"><p class="tightenable top"><a href="Help/WikiPlugin" class="interwiki"><span style="white-space: nowrap"><img src="images/interwiki.png" alt="" class="linkicon" border="0" />Help:</span><span class="wikipage">WikiPlugin</span></a> which displays a LDAP query as table.</p>
<h4>Usage</h4>
<pre class="tightenable top">
  &lt;?plugin LdapSearch ?&gt;
  &lt;?plugin LdapSearch
           host=&quot;localhost&quot;
           port=389
           basedn=&quot;&quot;
           filter=&quot;(cn=*)&quot;
           attributes=&quot;&quot;
  ?&gt;
  &lt;?plugin LdapSearch host=ldap.example.com filter=&quot;(ou=web-team)&quot;
                      attributes=&quot;sn cn telephonenumber&quot; ?&gt;
  &lt;?plugin LdapSearch host=&quot;ldap.itd.umich.edu&quot; basedn=&quot;&quot; filter=&quot;(sn=jensen)&quot; attributes=&quot;cn drink&quot; ?&gt;
  &lt;?plugin LdapSearch host=ldap.example.com attributes=&quot;cn sn telephonenumber&quot; ?&gt;
  &lt;?plugin LdapSearch host=bugs.debian.org port=10101 basedn=&quot;dc=current,dc=bugs,dc=debian,dc=org&quot;
                      filter=&quot;(debbugsPackage=phpwiki)&quot;
                      attributes=&quot;debbugsSeverity debbugsState debbugsTitle&quot; ?&gt;</pre>
<h4>Arguments</h4>
<dl><dt class="tightenable bottom">host <i>(default: from LDAP_AUTH_HOST or localhost)</i></dt>
<dd class="tightenable top"><blockquote class="tightenable top bottom"><p class="tightenable top bottom">hostname or ip or ldap:// uri to connect to.</p>
</blockquote>
</dd>
<dt class="tightenable bottom">port <i>(default: from LDAP_AUTH_HOST or 389)</i></dt>
<dd class="tightenable top"><blockquote class="tightenable top bottom"><p class="tightenable top bottom">portnumber to connect to.</p>
</blockquote>
</dd>
<dt class="tightenable bottom">basedn <i>(default: LDAP_BASE_DN)</i></dt>
<dd class="tightenable top"><blockquote class="tightenable top bottom"><p class="tightenable top bottom">connect string: &quot;ou=Users,o=Development,dc=mycompany.com&quot;</p>
</blockquote>
</dd>
<dt class="tightenable bottom">filter <i>(default: &quot;(cn=*)&quot;)</i></dt>
<dd class="tightenable top"><blockquote class="tightenable top bottom"><p class="tightenable top bottom">Optional ldap_search() filter argument</p>
</blockquote>
</dd>
<dt class="tightenable bottom">attributes <i>(default: empty)</i></dt>
<dd class="tightenable top"><blockquote class="tightenable top bottom"><p class="tightenable top bottom">space seperated fields to return as table columns: &quot;cn sn&quot;</p>
</blockquote>
</dd>
<dt class="tightenable bottom">options</dt>
<dd class="tightenable top bottom"><blockquote class="tightenable top bottom"><p class="tightenable top bottom">ldap_set_option(). Default: LDAP_SET_OPTION if host == LDAP_AUTH_HOST
Column seperated name=value pairs. Esp. needed for Windows Active directory:
&quot;LDAP_OPT_PROTOCOL_VERSION=3:LDAP_OPT_REFERRALS=0&quot;</p>
</blockquote>
</dd>
<dt class="tightenable top bottom">user</dt>
<dd class="tightenable top bottom"><blockquote class="tightenable top bottom"><p class="tightenable top bottom">Default: LDAP_AUTH_USER if host == LDAP_AUTH_HOST</p>
</blockquote>
</dd>
<dt class="tightenable top bottom">password</dt>
<dd class="tightenable top"><blockquote class="tightenable top bottom"><p class="tightenable top bottom">Default: LDAP_AUTH_PASSWORD if host == LDAP_AUTH_HOST
user and password are required for Windows Active directory.</p>
</blockquote>
</dd>
</dl>
<h4>Examples</h4>
<div class="plugin tightenable" id="WikiFormRichPlugin6"><form action="Help/LdapSearchPlugin.html?action=dumphtml" method="post" class="wikiformrich" accept-charset="iso-8859-1">
<input type="hidden" name="action" value="LdapSearch" /><div class="wikiaction">host&nbsp;<input name="host" value="bugs" type="text" /></div>
<div class="wikiaction">port&nbsp;<input name="port" value="10101" size="80" type="text" /></div>
<div class="wikiaction">basedn&nbsp;<input name="basedn" value="dc=current,dc=bugs,dc=debian,dc=org" size="80" type="text" /></div>
<div class="wikiaction">filter&nbsp;<input name="filter" value="(debbugsPackage=phpwiki)" size="80" type="text" /></div>
<div class="wikiaction">attributes&nbsp;<input name="attributes" value="debbugsSeverity debbugsState debbugsTitle" size="80" type="text" /></div>
<div class="wikiaction"><input type="submit" value="LdapSearch" class="wikiaction" /></div>
</form>
</div>
<h4>Author</h4>
<p class="tightenable top"><a href="http://phpwiki.sourceforge.net/phpwiki/JohnLines" class="interwiki"><span style="white-space: nowrap"><img src="images/interwiki.png" alt="" class="linkicon" border="0" />PhpWiki:</span><span class="wikipage">JohnLines</span></a></p>
<h4>See Also</h4>
<hr />
<p class="tightenable top bottom"><a href="PhpWikiDocumentation.html" class="wiki">PhpWikiDocumentation</a> <a href="Help/WikiPlugin" class="interwiki"><span style="white-space: nowrap"><img src="images/interwiki.png" alt="" class="linkicon" border="0" />Help:</span><span class="wikipage">WikiPlugin</span></a></p>
</div>

<div id="footer">  <hr class="printer" noshade="noshade" />
<p class="editdate">Owner: &quot;admin&quot;  Last edited on August 14, 2007  7:11 am by &quot;The PhpWiki programming team&quot;</p>
</div>

</div>
<!-- Add your Disclaimer here -->
</body>
</html>
