Good morning,

On 15/11/10 at 2:53 PM -0200, Eden Cardim <edencar...@gmail.com> wrote:

"Charlie" == Charlie Garrison <garri...@zeta.org.au> writes:

Charlie> I've never bothered to find out why, but I've run into
Charlie> situations where $c->user_exists returns true and $c->user
Charlie> returns false. I just check for defined($c->user) instead
Charlie> and that solved it for me.

Probably a mangled session?

Could be. I found a problem with my browser changing session cookie value to old/expired value after two requests. The user_exists problem was probably before I finally debugged the browser problem. FYI, the browser (OmniWeb) devs have acknowledged my bug report but have been unable to reproduce the problem (& fix it).


Charlie> I also agree with other users that auto is a better place
Charlie> to do that check.

Chaining is a lot more powerful because it allows you to distribute
responsibilities hierarchically throughout several actions:

I use a :AuthRequired method attribute and check for that in auto method. Is there anything inherently wrong with that method? I got the technique from someone on this list a while back.


Charlie

--
   Ꮚ Charlie Garrison ♊ <garri...@zeta.org.au>

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠  http://www.ietf.org/rfc/rfc1855.txt

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to