From: Danijel Milicevic Date: Sat, 11 Jun 2005 17:23:58 +0000 (+0000) Subject: Fixed: Applied Cookbook patch X-Git-Tag: 5.7099_04~1320 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7c1078a49a3c3f5a23b307395eccfc3c4e5a8b06;p=catagits%2FCatalyst-Runtime.git Fixed: Applied Cookbook patch --- diff --git a/lib/Catalyst/Manual/Cookbook.pod b/lib/Catalyst/Manual/Cookbook.pod index 5d56a46..c9d6033 100644 --- a/lib/Catalyst/Manual/Cookbook.pod +++ b/lib/Catalyst/Manual/Cookbook.pod @@ -188,7 +188,7 @@ We'll discuss the first variant for now: To log in a user you might use an action like this: - sub 'login' : Local { + sub login : Local { my ($self, $c) = @_; if ($c->req->params->{username}) { $c->session_login($c->req->params->{username}, @@ -199,6 +199,10 @@ To log in a user you might use an action like this: } } +This action should not go in your MyApp class...if it does, it will +conflict with the built-in method of the same name. Instead, put it +in a Controller class. + $c->req->params->{username} and $c->req->params->{password} are html form parameters from a login form. If login succeeds, then $c->req->{user} contains the username of the authenticated user.