[rt-users] Put LDAP info into Custom Fields of Users
Mike Peachey
mike.peachey at jennic.com
Tue May 4 05:23:41 EDT 2010
Max McGrath wrote:
> Hi everybody -
>
> Running RT 3.8.7 and using LDAP to authenticate users.
>
> There is this code available to set specific user information from LDAP:
>
> # The mapping of RT attributes on to LDAP attributes
> 'attr_map'
> => { 'Name' => 'uid',
>
> 'EmailAddress' => 'mail',
>
> 'RealName' => 'givenName',
>
> 'ExternalAuthId' => 'uid',
>
> 'Gecos' => 'uid',
>
> I was wondering if there is a way to take LDAP info and put it into a
> custom field.
I don't recall offhand how RT handles Custom Fields with respect to user
objects. The way the LDAP info is handled is that a user object is
pulled into a variable and the attribute hash is extracted to another,
then LDAP information is pulled and inserted into that hash and the
pushed right back into the user object, this way non-ldap-mapped
information is untouched, but all LDAP information is overwritten on
each lookup.
It is, then, easy to overwrite any existing user field with LDAP
information by adding it to the hash and pulling the specific field from
LDAP to write over it, but I don't know that Custom Fields are as
simple. Perhaps it can be done in the same way by referring to
{CustomField1} or similar. It's been a long time since I looked at CFs
that deeply.
Perhaps the way CommandByMail handles Custom Fields might provide useful
guidance.
--
Kind Regards,
__________________________________________________
Mike Peachey, IT Systems Administrator
Tel: +44 114 281 2655
Fax: +44 114 281 2951
Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK
Comp Reg No: 3191371 - Registered In England
http://www.jennic.com
__________________________________________________
More information about the rt-users
mailing list