Multi-valued LDAP attribute
Alan DeKok
aland at deployingradius.com
Fri Dec 23 15:32:02 CET 2011
Adam Track wrote:
> In a continuation to my previous issue about how to reference an LDAP
> attribute in post-auth, I am now wondering how to iterate through a
> multi-valued attribute in a perl script I call from post-auth. In the
> debug you can see all three values are returned:
Multi-value attributes are an array in Perl.
> I'm no perl expert, but shouldn't I be able to reference all three
> values with $RAD_REPLY{'Person-Type'}?
No. That entry is an array. You need @{$RAD_REPLY{'Person-Type'}},
and then de-reference each entry from there.
See the Perl documentation for more information.
Alan DeKok.
More information about the Freeradius-Users
mailing list