Correcting backwards compatibility bug with $user->store()
thanks to nilsonsfj for finding this bug
r53846@cain (orig r6511): jayk | 2007-07-07 02:05:09 +0000
$c->save_user_in_session($user, $realmname);
}
$user->auth_realm($realmname);
+ $user->store(ref($c->auth_realms->{$realmname}{'store'}));
$c->NEXT::set_authenticated($user, $realmname);
}
# this sets the realm the user originated in.
$user->auth_realm($realmname);
+ ## compatibility - some pre 0.10 store / credentials may need the store name,
+ ## this is not used by the current api in any form.
+ $user->store(ref($c->auth_realms->{$realmname}{'store'}));
+
return $user;
}
## auth_realm is the realm this user came from.
BEGIN {
- __PACKAGE__->mk_accessors(qw/auth_realm/);
+ __PACKAGE__->mk_accessors(qw/auth_realm store/);
}
## THIS IS NOT A COMPLETE CLASS! it is intended to provide base functionality only.
## Backwards Compatibility
## you probably want auth_realm, in fact. but this does work for backwards compatibility.
-sub store {
- my ($self) = @_;
- return $self->auth_realm->{store};
-}
+## store should be a read-write accessor - so it was moved to mk_accessors
+##sub store {
+## my ($self) = @_;
+## return $self->auth_realm->{store};
+##}
__PACKAGE__;