9 Aug
2018
9 Aug
'18
8:47 a.m.
On 07/08/18 18:08, Deepak Sehrawat wrote:
Can we configure it via MySQL as well?
From a post I made in April. I have a long complicated query which checks if the user has been deleted, or the user's account has been suspended, etc. It returns a value which is then used in various ways. update control { CustomVal := "%{sql:SELECT \ CASE \ WHEN (cs_suspended.value = '1') THEN 5010 \ WHEN (u.deleted != '0') THEN 5011 \ // etc Then the unlang code "decodes" the return value: if ( &control:CustomVal < 5000 ) { update reply { Filter-Id := &control:CustomVal Reply-Message += "Accept: MAC found." } } elsif (....