X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAuthentication%2FStore%2FLDAP%2FBackend.pm;h=e56297719ae4e5669b378524a2d1214cb6ec5aea;hb=baf99620bce87348b86c56eb46edef9395eb7ebe;hp=80aad955dbf26889934f69a7f85becc254738a24;hpb=d94851da6ba1c489ebd20d159c0df06c332b3687;p=catagits%2FCatalyst-Authentication-Store-LDAP.git diff --git a/lib/Catalyst/Authentication/Store/LDAP/Backend.pm b/lib/Catalyst/Authentication/Store/LDAP/Backend.pm index 80aad95..e562977 100644 --- a/lib/Catalyst/Authentication/Store/LDAP/Backend.pm +++ b/lib/Catalyst/Authentication/Store/LDAP/Backend.pm @@ -129,7 +129,7 @@ sub new { return $self; } -=head2 find_user( I ) +=head2 find_user( I, $c ) Creates a L object for the given User ID. This is the preferred mechanism for getting a @@ -142,21 +142,23 @@ C. The value will be compared against the LDAP C field. sub find_user { my ( $self, $authinfo, $c ) = @_; - return $self->get_user( $authinfo->{id} || $authinfo->{username} ); + return $self->get_user( $authinfo->{id} || $authinfo->{username}, $c ); } =head2 get_user($id) Creates a L object -for the given User ID. This is the preferred mechanism for getting a -given User out of the Store. +for the given User ID, or calls C on the class specified in +C. This instance of the store object, the results of +C and $c are passed as arguments (in that order) to C. +This is the preferred mechanism for getting a given User out of the Store. =cut sub get_user { - my ( $self, $id ) = @_; + my ( $self, $id, $c ) = @_; my $user = $self->user_class->new( $self, - $self->lookup_user($id) ); + $self->lookup_user($id), $c ); return $user; }