[Users] auth_db and load_credentials question

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Mar 14 18:51:45 CET 2007


Hi Klaus,

Klaus Darilion wrote:
> Hi!
>
> When I load AVPs during authentication - what type is the content of 
> the AVP? string? integer? Is it automatically derived from the column 
> type (like avp_db_query)?
yes. recognized types are DB_STR , DB_STRING and DB_INT.
>
> My problem is: I want to load an integer value and compare it against 
> an integer:
>
> modparam("auth_db", "load_credentials", "s:maxcalls=maxcalls")
> ...
> if(avp_check("$avp(i:40)", "ge/$avp(s:maxcalls)/g") {
>
> Does this work? What happens if I compare an integer with a string - 
> will there be a conversion?
no conversion - it will return false with error.

regards,
bogdan
>
> thanks
> klaus
>





More information about the Users mailing list