multiple columns in rlm_sql
Alan Buxey
alan.buxey at gmail.com
Fri Apr 13 19:16:18 CEST 2018
with later versions of 3.0.x you can do things like
update control {
Tmp-String-0 := "%{sql:SELECT
CONCAT(attribute,'#',op,'#',value) from database_table where username
= '%{User-Name}'}"
}
if ("%{explode:&control:Tmp-String-0 #}" > 0) {
foreach &control:Tmp-String-0 {
if ("%{Foreach-Variable-0}" =~
/^([^=]+)=(.*)$/) {
update reply {
"%{1}" "%{2}" "%{3}"
}
}
}
}
edit as required....should do the job.
alan
More information about the Freeradius-Users
mailing list