23 Dec
2011
23 Dec
'11
9:32 a.m.
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.