Subject: | $c->user not working if there is no user |
Hi!
I'm currently not entirely sure if the problem lies within C:P:A, but it
seems so...
When I'm calling (in a template) c.user, catalyst dies with
Can't call method "auth_realms" on an undefined value at
/opt/perl5.10/lib/site_perl/5.10.0/Catalyst/Plugin/Authentication.pm
line 166
It seems that
164: $c->_user( my $user = $realm->from_session( $c, $frozen_user ) );
doesn't set $user, so the following call
166: $user->auth_realm($realmname);
fails.
adding
165: return unless $user;
fixes the problem
any other ideas?