3.44.1. AuthSelect Previous topic Parent topic Child topic Next topic

This SQL query is used to select details of users who are attempting to log in. %0 is replaced by the quoted and (possibly rewritten) User-Name. Other special formatting characters may be used.
Defaults to
select PASS_WORD, STATICADDRESS, TIMELEFT, MAXLOGINS, \
SERVICENAME, BADLOGINS, VALIDFROM, VALIDTO from RADUSERS \
where USERNAME=%0
Tip
You can force AuthBy RADMIN to honour additional fields in your AuthSelect statement by using AuthColumnDef. For example, you might add 3 new columns to your RADUSERS table and wish to use them as reply items. You could do that something like this:
# Honour FRAMED_NETMASK,FRAMED_FILTER_ID,MAXIDLETIME too
AuthSelect select PASS_WORD,STATICADDRESS,TIMELEFT,\
                  MAXLOGINS,SERVICENAME, BADLOGINS, VALIDFROM, \
                  VALIDTO, FRAMED_NETMASK,FRAMED_FILTER_ID,MAXIDLETIME \
           from RADUSERS where USERNAME=%0
AuthColumnDef 0,Framed-IP-Netmask,reply
AuthColumnDef 1,Filter-Id,reply
AuthColumnDef 2,Idle-Timeout,reply
Note that the numbering of AuthColumnDef 0 starts with the field following the first 8 minimum and required fields.