Aaaaah.. thanks! Wouldn't have figured that out on my own...

A.


From: Alan DeKok <aland@deployingradius.com>;
To: Adam Track <adamtrack@rocketmail.com>; FreeRadius users mailing list <freeradius-users@lists.freeradius.org>;
Subject: Re: Multi-valued LDAP attribute
Sent: Fri, Dec 23, 2011 2:32:02 PM

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.