X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAuthentication%2FRealm.pm;h=b36d14d6e6f7cacb2a8c774ac5fdb7b4e98f0964;hb=eea5667a529e81fe21f1c36ee887b0e7d5e29693;hp=d7d33e6ba9baf5d041d12e7e79fc22d433fe0070;hpb=9c469e379f826652f73f6465d97f638be7ef51fb;p=catagits%2FCatalyst-Plugin-Authentication.git diff --git a/lib/Catalyst/Authentication/Realm.pm b/lib/Catalyst/Authentication/Realm.pm index d7d33e6..b36d14d 100644 --- a/lib/Catalyst/Authentication/Realm.pm +++ b/lib/Catalyst/Authentication/Realm.pm @@ -191,9 +191,10 @@ sub restore_user { # this sets the realm the user originated in. $user->auth_realm($self->name); - } else { - $c->log->error("Store claimed to have a restorable user, but restoration failed. Did you change the user's id_field?"); - $self->failed_user_restore($c); + } + else { + $self->failed_user_restore($c) || + $c->error("Store claimed to have a restorable user, but restoration failed. Did you change the user's id_field?"); } return $user; @@ -201,10 +202,12 @@ sub restore_user { ## this occurs if there is a session but the thing the session refers to ## can not be found. Do what you must do here. +## Return true if you can fix the situation and find a user, false otherwise sub failed_user_restore { my ($self, $c) = @_; $self->remove_persisted_user($c); + return; } sub persist_user {