[ic] Keeping track of how much a user has spent...

Russ Mann interchange-users@interchange.redhat.com
Wed Jan 23 15:22:01 2002


Thank you Kevin,

This is already in my catalog.cfg

UserDB    default    scratch       "dealer credit_limit"

With this line in the catalog.cfg (and restarted), it would still reset the
variable upon [userdb save]

--Russ

-----Original Message-----
From: interchange-users-admin@interchange.redhat.com
[mailto:interchange-users-admin@interchange.redhat.com]On Behalf Of
Kevin Walsh
Sent: Wednesday, January 23, 2002 10:32 AM
To: interchange-users@interchange.redhat.com
Subject: RE: [ic] Keeping track of how much a user has spent...


>
> * most of the context removed due to a lack of proper quoting *
>
> Thank you - I experimented a little and found that adding the line:
> [value name=credit_limit set="[scratch credit_limit]" hide=1]
> right before the [userdb save] cleaned it all up.
>
You probably shouldn't keep your credit_limit as a value, when userdb
can read/write scratches directly.  The problem with values is that
users could potentially change their credit limit by appending
something along the lines of "credit_limit=1000" to their list of URI
arguments.

To configure userdb to read/write credit_limit as a scratch, edit your
catalog.cfg file.  Look for an existing "UserDB scratch" directive, or
equivalent, and append your scratch variable name to the list.  If no
UserDB scratch directive is present in catalog.cfg then add
"UserDB scratch credit_limit" to catalog.cfg.

Once you have restarted, you'll find that you can read/write this value
as a scratch without the need to convert to and from a value.
[userdb load] would load your credit_limit into a scratch automatically
just as [userdb save] would save it.

--
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/

_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users