Hi list,
So this should work? ATM I am nearly sure that this could never work, since the 1st query will deliver the string, that rlm_sql should expand with another query.
But it would be great if it will work :-)
rlm_sql does recursive xlat, all xlat expansions in the SQL query are done before the query string is passed off to the SQL libraries. The xlat parser is just looking for a string bounded by %{ }.
Your query should be: %{sql:SELECT disctime.time FROM `disctime` WHERE disctime.user = '%{User-Name}'}
It's not a problem in FreeRADIUS it's a problem in your SQL syntax :)
Both :-) I missed some backticks: `%{sql: select sessionto('%{User-Name}') }` is working. sessionto is a postgres function which calculates the session-timeout. Thanks BR uwe -- kiste lat: 54.322684, lon: 10.13586