<div dir="ltr">







<p class="">Hi, Thanks for the response. </p>
<p class="">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?</p>
<p class="">expiration {</p>
<p class=""><span class="">     </span>#</p>
<p class=""><span class="">     </span># The Reply-Message which will be sent back in case the</p>
<p class=""><span class="">     </span># account has expired. Dynamic substitution is supported</p>
<p class=""><span class="">     </span>#</p>
<p class=""><span class="">     </span>reply-message = "Password Has Expired\r\n"</p>
<p class=""><span class="">     </span></p>
<p class=""><span class="">     </span># ****** DELETE THE RADREPLY ENTRIES **********</p>
<p class=""><br></p>
<p class=""><span class="">     </span>#reply-message = "Your account has expired, %{User-Name}\r\n"</p>
<p class="">}</p></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 4, 2013 at 4:06 PM, Rôney Eduardo <span dir="ltr"><<a href="mailto:roneyeduardosantos@gmail.com" target="_blank">roneyeduardosantos@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2013/6/4 Ethan Hayon <<a href="mailto:ehayon@gmail.com">ehayon@gmail.com</a>>:<br>
<div class="im">><br>
> Should I be doing this with unlang? I was thinking of using unlang to delete<br>
> all of the associated radreply entries in modules/expiration.<br>
><br>
> Has anyone experienced this problem before, and what solution do you think<br>
> is best?<br>
><br>
<br>
</div>You can do with unlang. Put the following in the authorize section,<br>
before "sql":<br>
<br>
        if(User-Name){<br>
                "%{sql:UPDATE radreply SET zzzz  WHERE yyyy}"<br>
        }<br>
<br>
--<br>
Roney Eduardo<br>
-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br>
</blockquote></div><br></div>