From: Yuval Kogman Date: Wed, 21 Dec 2005 20:24:10 +0000 (+0000) Subject: add a check that user really exists to Store::Htpasswd::User's constructor X-Git-Tag: v0.02~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Authentication-Store-Htpasswd.git;a=commitdiff_plain;h=ad94190ef655d2bc73c321662eb33f4a7d9ba601 add a check that user really exists to Store::Htpasswd::User's constructor --- diff --git a/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/User.pm b/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/User.pm index a07771d..3a80007 100644 --- a/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/User.pm +++ b/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/User.pm @@ -13,6 +13,8 @@ use overload '""' => sub { shift->id }, fallback => 1; sub new { my ( $class, $store, $user ) = @_; + return unless $user; + bless { store => $store, user => $user }, $class; }