Hello Michael, Wednesday, May 29, 2002, 12:00:09 PM, you wrote:
MB> I would like to use freeradius to offer a prepaid service where users MB> can buy a certain number of days and will have unlimited use untill that MB> period is up. MB> I created a field in the database with the 'credit expires' date and MB> have authorize_reply_query() returning a value for Session-Timeout so that MB> the NAS can inform/disconnect the user. MB> How can I reject a login and provide a message to the NAS if the current MB> time is later than the 'credit expires' time in the database? Can MB> authorize_check_query() result in a message being sent back to the NAS? MB> Is there another way to do this? I want the NAS to knnow it's a problem MB> with credit and not simple a wrong password. MB> My first (ugly) attempt to return Session-Timeout uses the following: MB> authorize_reply_query = "SELECT id,UserID,'Session-Timeout', MB> paidtill-unix_timestamp() FROM user WHERE Userid = '%{SQL-User-Name}'" MB> This stops me using any other radreply values. Is there a cleaner way to MB> get the number of seconds till the 'credit expires' date into Session-Timeout? For that purposes I wrote functions in postgresql that are running from sql querys of radiusd. -- Best regards, Dinar mailto:[EMAIL PROTECTED] - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html