[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Keeping track of how much a user has spent...
At 05:31 PM 01/23/2002 +0000, you wrote:
> >
> > * 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
>_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/
>
>_______________________________________________
That's a very good point, and in fact this is present in the foundation
demo in 4.8.3.
- Ed L.
===============================================================
New Media E.M.S. Software Solutions for Business
463 Main St., Suite D eCommerce | Consulting | Hosting
Placerville, CA 95667 edl@newmediaems.com
(530) 622-9421 http://www.newmediaems.com
(866) 519-4680 Toll-Free (530) 622-9426 Fax
===============================================================