oh wait, it was already resolved
[catagits/Catalyst-Authentication-Store-Htpasswd.git] / lib / Catalyst / Plugin / Authentication / Store / Htpasswd / User.pm
index 42582d6..ad5d17c 100644 (file)
@@ -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;
 }
 
@@ -26,7 +28,8 @@ sub supported_features {
                password => {
                        self_check => 1,
                },
-               session => 1
+               session => 1,
+        roles => 1,
        };
 }
 
@@ -95,7 +98,7 @@ Returns whether the password is valid.
 Returns an array of roles, which is extracted from a comma-separated list in the
 third field of the htpasswd file.
 
-=head1 COPYRIGHT & LICNESE
+=head1 COPYRIGHT & LICENSE
 
        Copyright (c) 2005 the aforementioned authors. All rights
        reserved. This program is free software; you can redistribute