Skip Menu |

This queue is for tickets about the Catalyst-Plugin-Authentication-CDBI CPAN distribution.

Report information
The Basics
Id: 13547
Status: rejected
Priority: 0/
Queue: Catalyst-Plugin-Authentication-CDBI

People
Owner: Nobody in particular
Requestors: m.romani [...] spinsoft.it
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.06
Fixed in: (no value)



Subject: Make $c->req->{user} a CDBI object
After applying this patch, $c->req->{user} is no longer just the username of the authenticated user, it is a CDBI object representing the relevant row in the users table.
86c86 < $user_class->search( --- > my $obj = $user_class->search( 88c88 < ) --- > )->first 91c91 < $c->request->{user} = $user; --- > $c->request->{user} = $obj; 248,249c248 < if ( my $user = < $user_class->search( { $user_field => $c->request->{user} } )->first ) --- > if ( my $user = $c->request->{user} )
[guest - Wed Jul 6 08:44:19 2005]: Show quoted text
> After applying this patch, $c->req->{user} is no longer just the > username of the authenticated user, it is a CDBI object > representing the relevant row in the users table. >
A is missing from the previous patch. New patch is provided. Marcello
86c86 < $user_class->search( --- > my $obj = $user_class->search( 88c88 < ) --- > )->first 91c91 < $c->request->{user} = $user; --- > $c->request->{user} = $obj; 175c175 < $c->session->{user} = $user; --- > $c->session->{user} = $c->request->{user}; 248,249c248 < if ( my $user = < $user_class->search( { $user_field => $c->request->{user} } )->first ) --- > if ( my $user = $c->request->{user} )
[guest - Wed Jul 6 08:44:19 2005]: Show quoted text
> After applying this patch, $c->req->{user} is no longer just the > username of the authenticated user, it is a CDBI object representing > the relevant row in the users table. >
Closing as this plugin is now deprecated. In C::P::Authentication::Store::DBIC, you can get the user object by calling $c->user_object.
[AGRUNDMA - Mon Dec 5 13:37:14 2005]: Show quoted text
> [guest - Wed Jul 6 08:44:19 2005]: >
> > After applying this patch, $c->req->{user} is no longer just the > > username of the authenticated user, it is a CDBI object representing > > the relevant row in the users table. > >
> > Closing as this plugin is now deprecated. In > C::P::Authentication::Store::DBIC, you can get the user object by > calling $c->user_object.
I suggest adding a {user_object} field to this plugin too so that one can say: $c->req->{user_object} # cdbi object instead of MyApp::M::User->retrieve($c->req->{user_id}); # also a CDBI object... I'm willing to submit a patch.