
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
RE: [ic] Question about Autoload
> > It holds whatever it held from the last page. When a user logs in,
> > the database is read and $Values and $Scratch are updated. This
> is persistent.
> > By the way, if you think people might fiddle with the pricefield value
> > (remember, a user can set a $Values simply by accessing a URL) then
> > it would be good to define pricefield as a Scratch setting and
> > not for Values.
>
> This is a good point about using a Scratch variable and not a form
> Value. I guess I'm being a little obtuse (btw, I can't use that word
> without thinking about "Shawshank Redemption"); but, I'm still not
> sure how to apply this. How/when/where do I set the scratch variable?
> Would the best place be in a mv_click block on the login page?
Hi Doug,
You can use the 'Userdb default' directive in catalog.cfg to load a field
from the userdb table on login:
UserDB default scratch "field1 field2"
this would load scratch variables field1, field2 with the values from the
corresponding fields from the user record.
If your data isn't in the userdb, I guess the mv_click routine would be the
best way.
BTW. It would be nice to have a point to break in here.. say a sub which is
called upon login automatically and can be defined in the catalog.cfg. Also,
the same thing on the establishment of a new session... this is comething
which MS IIS allows in the setting up of a 'web application'. This would be
an improvement on the autoload routine which is run on each page delivery,
particularly where the routine is big, IMHO.
Jonathan
Webmaint.
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users