[dev] [Patch] Check for requied attributes

Tarjei Huse tarjei+a_lists.phpgw at nu.no
Mon Jul 26 07:13:45 PDT 2004


Hi, 

The attached patch adds functionality to turbas ldapdriver to check if
an entry beeing added contains all the attributes needed.

This is especially practical with regard to adding entries from other
applications (like imp) as they cannot tell the user that f.x. the
Lastname field is required. As the patch is no, it adds just a "N/A"
string instead.


Dependencies:
The function needs Net_LDAP. If you do not use the functionality, there
is no dependencies.

Configurationvariables:
To use the patch, you have to add 
'checkrequired' => true 

to the 'params' part of the ldapsource in config/sources.php. F.x. like
this:

'params' => array(
        'server' => 'localhost',
        'root' => $v['ou'],
        'bind_dn' => 'uid=' . $uid . ',ou=People,' . $basedn,
        'bind_password' => Auth::getCredential('password'),
        'dn' => array('cn', 'uid'),
        'objectclass' => array('top',
                               'person',
                               'organizationalPerson','inetOrgPerson'),
        'charset' => 'utf-8',
        'version' => 3,
        'checkrequired' => true
    ),



Regards,
Tarjei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ldap.php.checkrequired.patch
Type: text/x-patch
Size: 2520 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20040726/38387a09/ldap.php.checkrequired.bin


More information about the dev mailing list