X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FPlugin%2FAuthentication%2FCredential%2FPassword.pm;h=f9d9b620b5ee1be0fa98e54e5c05ed1ec0f3cbc6;hb=c0f72d03a107a3e8246e05cded0c421f3e296192;hp=406a79e4158ce9d8db44fa6f3628e65d622cdced;hpb=5bbbabc6044b18106de3a191bda220c6d44033c1;p=catagits%2FCatalyst-Plugin-Authentication.git diff --git a/lib/Catalyst/Plugin/Authentication/Credential/Password.pm b/lib/Catalyst/Plugin/Authentication/Credential/Password.pm index 406a79e..f9d9b62 100644 --- a/lib/Catalyst/Plugin/Authentication/Credential/Password.pm +++ b/lib/Catalyst/Plugin/Authentication/Credential/Password.pm @@ -13,20 +13,26 @@ sub login { my ( $c, $user, $password, @rest ) = @_; for ( $c->request ) { - unless ( $user ||= $_->param("login") - || $_->param("user") - || $_->param("username") ) - { + unless ( + defined($user) + or + $user = $_->param("login") + || $_->param("user") + || $_->param("username") + ) { $c->log->debug( "Can't login a user without a user object or user ID param") if $c->debug; return; } - unless ( $password ||= $_->param("password") - || $_->param("passwd") - || $_->param("pass") ) - { + unless ( + defined($password) + or + $password = $_->param("password") + || $_->param("passwd") + || $_->param("pass") + ) { $c->log->debug("Can't login a user without a password") if $c->debug; return;