rt.cpan.org bug 16518
[catagits/Catalyst-Authentication-Store-Htpasswd.git] / lib / Catalyst / Plugin / Authentication / Store / Htpasswd / User.pm
index ad5d17c..78a4ab5 100644 (file)
@@ -20,7 +20,7 @@ sub new {
 
 sub id {
     my $self = shift;
-    return $self->user->username;
+    return ( $self->user || return )->username;
 }
 
 sub supported_features {