26 |
|
|
27 |
my $dbh = DBI->connect($dsn . $database, $user,$passwd, { RaiseError => 1, AutoCommit => 0 }) || die $DBI::errstr; |
my $dbh = DBI->connect($dsn . $database, $user,$passwd, { RaiseError => 1, AutoCommit => 0 }) || die $DBI::errstr; |
28 |
|
|
29 |
|
# Net::LDAP::Entry will lc all our attribute names anyway, so |
30 |
|
# we don't really care about correctCapitalization for LDAP |
31 |
|
# attributes which won't pass through DBI |
32 |
my $sth = $dbh->prepare(q{ |
my $sth = $dbh->prepare(q{ |
33 |
select |
select |
34 |
userid as uid, |
userid as uid, |
35 |
firstname as givenName, |
firstname as givenName, |
36 |
surname as sn, |
surname as sn, |
37 |
|
concat( |
38 |
|
firstname, |
39 |
|
' ', |
40 |
|
surname |
41 |
|
) as cn, |
42 |
cardnumber as otherPager, |
cardnumber as otherPager, |
43 |
email as mail |
email as mail |
44 |
from borrowers |
from borrowers |