Thanks, I saw this, but unfortunaltely whereas in dialup.conf the variable is '%{Sql-Group}', It seems i cannot re-use it outside of an sql module.
That is probably a bug then. Sql-Group should be available outside sql module. I've used it in huntgroups in 1.1.7.
I have even tried to add an update control directive to add a Tmp-String-0 (correctly expanded in the sql module) at the end of the sql module and so re-use it at the end of the aythorize section (outside sql module), but it doesn't work as it's expanded to an empty string...
That's OK. unlang doesn't work inside module configuration, only server configuration.
You need to use lists with attributes in unlang (in this case attribute is from control list) since default is request.
same result with "%{control:Tmp-String-0}".
Let's try a workaround. Get group name by executing query again in authorize section: update control { Tmp-String-0 := "%{sql:SELECT GroupName FROM radusergroup WHERE UserName='%{User-Name}' ORDER BY priority}" } "%{control:Tmp-String-0}" will hold group name then. Ivan Kalik Kalik Informatika ISP