[ic] question about saving to userdb

Mike Heins interchange-users@interchange.redhat.com
Sat Jan 5 21:42:00 2002


Quoting chad townsend (chad@hq.mycity.com):
> 
> i have some code that says:
> 
> my $db = $Db{userdb};
>    $db->set_field($id, 'dealer', 1);
> 
> which works fine, but in order for it to 'take effect' or so it seems
> in the site i have to go to the admin ui, click on customers, click on
> the customer in question and click 'OK' even though it says 'dealer
> YES'. how can i get interchange to recognize right away that this
> 'user' is now a dealer.

That is not the problem. When you go to the UI, you are logging in as
an admin and therefore logging out as the user you are testing. When you
re-login as the user you are testing, voila! They are a dealer.

This is because the dealer parameter is only set upon login. If you
wanted to do that without logging out and then back in again, you
could do:

	[userdb get_values]

Or probably more simply:

	[set dealer]1[/set]

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

Experience is what allows you to recognize a mistake the second
time you make it. -- unknown