Ah, now I understand!

So in my query I would delete the entries if the current date is >
expiration date


That makes sense!


Thanks so much,

Ethan


On Jun 4, 2013, at 5:41 PM, Rôney Eduardo <roneyeduardosan...@gmail.com>
wrote:


2013/6/4 Ethan Hayon <eha...@gmail.com>:

Hi, Thanks for the response.


I only want to run the SQL query if the user's account is already expired.

Wouldn't I need to put it in here?



No,


You can adapt the instruction I gave you to delete the entries based

on the attributes you want to check for a "stale expired account".


You could do, for instance:


      if(User-Name){

              "%{sql:DELETE FROM radreply WHERE

username='%{User-Name}' AND attribute='%{WhatEverYouUse} AND

value='%{Calling-Station-Id}' }"

      }


--

Roney Eduardo

-

List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html


On Tue, Jun 4, 2013 at 5:41 PM, Rôney Eduardo
<roneyeduardosan...@gmail.com>wrote:

> 2013/6/4 Ethan Hayon <eha...@gmail.com>:
> > Hi, Thanks for the response.
> >
> > I only want to run the SQL query if the user's account is already
> expired.
> > Wouldn't I need to put it in here?
> >
>
> No,
>
> You can adapt the instruction I gave you to delete the entries based
> on the attributes you want to check for a "stale expired account".
>
> You could do, for instance:
>
>         if(User-Name){
>                 "%{sql:DELETE FROM radreply WHERE
> username='%{User-Name}' AND attribute='%{WhatEverYouUse} AND
> value='%{Calling-Station-Id}' }"
>         }
>
> --
> Roney Eduardo
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to