Removing stale expired accounts from SQL

Ethan Hayon ehayon at gmail.com
Tue Jun 4 23:55:09 CEST 2013


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 <roneyeduardosantos at gmail.com>
wrote:


2013/6/4 Ethan Hayon <ehayon at 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
<roneyeduardosantos at gmail.com>wrote:

> 2013/6/4 Ethan Hayon <ehayon at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130604/6cb85bcd/attachment-0001.html>


More information about the Freeradius-Users mailing list