On 13 Oct 2011, at 19:40, Ray Scholl wrote: > Thank you – > > You refer to them as variables – so I am assuming it cannot be a constant? I > must declare a variable and assign ‘otp’?
No. I said they could be attributes references or strings. You can use string constants. Like most languages double quoted strings are expanded, single quoted strings are treated as literals. Sorry should have been My-Attr etc.. If you want to check if a user was in a specific group, you would write if("%{clients_ldap:LDAP-Group}" == 'my_ldap_group'){ # Do stuff } > sOTP := ‘otp’ > if ( “%{FreeRadius-Client-Shortname}%{sOTP}” == “%{clients_ldap-Ldap-Group}” > ) { > > Am I correct? Again, thanks in advance. Not quite. If you want to call xlat on an instance of a module the syntax is module:variable "%{clients_ldap:LDAP-Group}" Also for assignment update <attribute list> { <attribute> <op> <value> } see man unlang for more details -Arran Arran Cudbard-Bell a.cudba...@freeradius.org Betelwiki, Betelwiki, Betelwiki.... http://wiki.freeradius.org/ !
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html