Update of /cvsroot/openinteract/OpenInteract/pkg/base_user/OpenInteract/User
In directory usw-pr-cvs1:/tmp/cvs-serv30005/OpenInteract/User
Modified Files:
LDAP.pm
Log Message:
updated OpenInteract::User::LDAP to work with multiple datasources
Index: LDAP.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_user/OpenInteract/User/LDAP.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** LDAP.pm 2001/08/27 17:05:43 1.3
--- LDAP.pm 2001/10/23 14:28:45 1.4
***************
*** 19,23 ****
sub check_password {
my ( $self, $check_passwd ) = @_;
! my $connect_info = $self->connection_info;
my $ldap = eval { OpenInteract::LDAP->connect( $connect_info ) };
if ( $@ ) {
--- 19,33 ----
sub check_password {
my ( $self, $check_passwd ) = @_;
! my $R = OpenInteract::Request->instance;
!
! # If we're using multiple datasources
! # (SPOPS::LDAP::MultiDatasource) then the name of the datasource
! # should be stored in the object. Otherwise we just use the
! # default for this class.
!
! my $datasource = $self->{_datasource} || $self->get_connect_key;
! $R->DEBUG && $R->scrib( 1, "Trying to check password for user", $self->dn,
! "against datasource ($datasource)" );
! my $connect_info = $self->connection_info( $datasource );
my $ldap = eval { OpenInteract::LDAP->connect( $connect_info ) };
if ( $@ ) {
***************
*** 26,29 ****
--- 36,40 ----
system_msg => $@,
type => 'db' });
+ $R->scrib( 0, "Failed to connect to LDAP directory: $@" );
die $OpenInteract::Error::user_msg;
}
***************
*** 31,34 ****
--- 42,46 ----
bind_password => $check_passwd };
eval { OpenInteract::LDAP->bind( $ldap, $bind_info ) };
+ $R->DEBUG && $R->scrib( 1, "Result of password check (empty means ok): ($@)" );
return ( ! $@ );
}
|