logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: different default modes?: msg#00148

Subject: Re: different default modes?
On 2004-08-28, Andreas Schuldei 
<andreas-ruPnrykXPLJg9hUCZPvPmw@xxxxxxxxxxxxxxxx> wrote:
> i write a use administration interface and i would distinguish
> between "silly" users and admins. the point in this is not to
> intimidate the users with screens which could confuse them but
> bring them to the "password-changing" page right away.
>
> so it put this code in sub setup{}:
>
>     # set the default mode for users
>     if ( is_silly( $remote_user ) ) {
>         $self->start_mode('EditUserData');
>         $self->query->params( -name  => "user_name" ,
>                               -value => $remote_user );
>     }
>     else {
>         $self->start_mode('AdminSearch');
>     }
>
> the problem is that this seems to have no effect. the users still
> end up on the "adminSearch" page. how should this be done
> properly?

Have you confirmed that "is_silly()" is ever running true? You could do
that by putting a "warn" statement in the "if" block and checking the
logs.

Otherwise, your code looks OK from what you describe as your goal.

        Mark


-- 
http://mark.stosberg.com/ 


---------------------------------------------------------------------
Web Archive:  
http://www.mail-archive.com/cgiapp-svx1JCNWaqPWzzAP45jFb16hYfS7NtTn@xxxxxxxxxxxxxxxx/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: 
cgiapp-unsubscribe-svx1JCNWaqPWzzAP45jFb16hYfS7NtTn@xxxxxxxxxxxxxxxx
For additional commands, e-mail: 
cgiapp-help-svx1JCNWaqPWzzAP45jFb16hYfS7NtTn@xxxxxxxxxxxxxxxx





Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>