added cn
[virtual-ldap] / lib / LDAP / Koha.pm
index 3c7c1de..801c4fd 100644 (file)
@@ -26,11 +26,19 @@ require 'config.pl' if -e 'config.pl';
 
 my $dbh = DBI->connect($dsn . $database, $user,$passwd, { RaiseError => 1, AutoCommit => 0 }) || die $DBI::errstr;
 
+# Net::LDAP::Entry will lc all our attribute names anyway, so
+# we don't really care about correctCapitalization for LDAP
+# attributes which won't pass through DBI
 my $sth = $dbh->prepare(q{
        select
                userid                  as uid,
                firstname               as givenName,
                surname                 as sn,
+               concat(
+                       firstname,
+                       ' ',
+                       surname
+               )                               as cn,
                cardnumber              as otherPager,
                email                   as mail
        from borrowers