On 2004-08-28, Andreas Schuldei <[EMAIL PROTECTED]> 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/[EMAIL PROTECTED]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]