User::Hash prefers id/store based serialization if it's possible
[catagits/Catalyst-Plugin-Authentication.git] / lib / Catalyst / Plugin / Authentication / Store / Minimal / Backend.pm
index 540b4d7..d08e330 100644 (file)
@@ -36,6 +36,8 @@ sub get_user {
             return $user;
         }
         elsif ( ref $user eq "HASH" ) {
+            $user->{id} ||= $id;
+            $user->{store} ||= $self;
             return bless $user, "Catalyst::Plugin::Authentication::User::Hash";
         }
         else {