Added isVisitor, isAdmin, and isRegistered methods to User object instead

of hard coding checks everywhere with group ids. And updated the code base 
   to match.
This commit is contained in:
JT Smith 2008-09-16 22:32:36 +00:00
parent 586164d8d0
commit ef120fb06b
52 changed files with 201 additions and 118 deletions

View file

@ -364,7 +364,7 @@ sub www_selectPaymentGateway {
my $i18n = WebGUI::International->new( $session, 'Shop' );
# Make sure the user is logged in.
if ($session->user->userId eq '1') {
if ($session->user->isVisitor) {
$session->scratch->set( 'redirectAfterLogin', $session->url->page('shop=pay;method=selectPaymentGateway') );
# We cannot use WebGUI::Operation::execute( $session, 'auth'); because the method form param used by the