(RADIATOR) Can you use SQL if statements in radiator?

Craig Gittens cgittens at sunbeach.net
Fri Nov 28 18:50:25 CST 2003


Ok I understand how AuthBy works now.

So am I correct in my understanding that if AcctColumnDef and
AcctSQLStatement are used in the same AuthBY that the default
AcctInsertQuery is also run? The question after that if the answer is yes:
Does it do an AcctInsertQuery for more than the start record if you specify
HandleAcctStatusType Start?

I don't want to break the system I already have. There doesn't seem a fast
and friendly way to do what I want using radiator and every time I think I
may have it solved another problem crops up with the logic!?!?! I guess this
is my own fault since I don't know how to code in PERL.

Craig.


-----Original Message-----
From: Hugh Irvine [mailto:hugh at open.com.au]
Sent: Friday, November 28, 2003 7:26 PM
To: Craig Gittens
Cc: Toomas Karner; Radiator
Subject: Re: (RADIATOR) Can you use SQL if statements in radiator?



Hello Craig -

In that case you should change the first AuthBy SQL to something like
this:


	<AuthBy SQL>
		DBSource	dbi:ODBC:x
		DBUsername	xx
		DBAuth		xx

		FailureBackoffTime 30

		AuthSelect

		HandleAcctStatusTypes Start

		AcctSQLStatement \
				update Login \
					set Expiry_Date = getdate() + 7, First_Use = getdate() \
          				where Login_name = %U and \
          				First_Use is NULL

	</AuthBy SQL>


This will only run the update query when the accounting start is
received for a successful login.

In regards to your question, I am not sure I understand what you are
asking. But if you are talking about how you had configured this to
begin with, the overall result would have been the result of the second
AuthBy clause which was "Ignore" due to having both
"IgnoreAuthentication" and "IgnoreAccounting" set. In general you want
to have the last AuthBy clause in the sequence being the one that does
the actual authentication, so the result from it is the overall result.


regards

Hugh






===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list