Fixed Duration Weekly, Monthly and Daily Accounts

JennyBlunt jennyshoehorn at me.com
Sat Nov 12 13:49:32 CET 2011


Thanks for the help, that's very useful. I can get the time in there now but
have a question about getting our access-period out. 

In post-auth, I've tried this query to get the access-period out:

if (! "%{control.Tmp-String-0}") {
    update control {
      Tmp-String-2 := "%{sql: SELECT value FROM radcheck WHERE
username='%{User-Name}' and attribute = 'Access-Period'}"
      Tmp-String-3 := "%{sql: INSERT INTO radcheck
(username,attribute,op,value) values ('%{User-Name}', 'Expiration', ':=',
'%{Tmp-String-2}')}; SELECT NOW()"
    }
  }

In freeradius, Tmp-String-2 has no value, whereas if I run the query in
mysql, I get a value of 86400 (I know the above doesn't sum anything).

How can I get and use the value?


--
View this message in context: http://freeradius.1045715.n5.nabble.com/Fixed-Duration-Weekly-Monthly-and-Daily-Accounts-tp4950022p4986842.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.



More information about the Freeradius-Users mailing list