aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/DJabberd/Plugin/VCard/LDAP.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/DJabberd/Plugin/VCard/LDAP.pm b/lib/DJabberd/Plugin/VCard/LDAP.pm
index 63a2a6a..1320dd8 100644
--- a/lib/DJabberd/Plugin/VCard/LDAP.pm
+++ b/lib/DJabberd/Plugin/VCard/LDAP.pm
@@ -6,6 +6,7 @@ use strict;
6use base 'DJabberd::Plugin::VCard'; 6use base 'DJabberd::Plugin::VCard';
7 7
8use Net::LDAP; 8use Net::LDAP;
9use MIME::Base64;
9 10
10our $logger = DJabberd::Log->get_logger(); 11our $logger = DJabberd::Log->get_logger();
11 12
@@ -15,11 +16,11 @@ DJabberd::VCard::LDAP - LDAP VCard Provider for DJabberd
15 16
16=head1 VERSION 17=head1 VERSION
17 18
18Version 0.02 19Version 0.03
19 20
20=cut 21=cut
21 22
22our $VERSION = '0.02'; 23our $VERSION = '0.03';
23 24
24=head1 SYNOPSIS 25=head1 SYNOPSIS
25 26
@@ -120,7 +121,7 @@ sub load_vcard {
120 my $entry = $srch->entry(0); 121 my $entry = $srch->entry(0);
121 my $photo = $entry->get_value('jpegPhoto'); 122 my $photo = $entry->get_value('jpegPhoto');
122 if (defined $photo) { 123 if (defined $photo) {
123 $photo = '<PHOTO><BINVAL>'.$photo.'</BINVAL></PHOTO>'; 124 $photo = '<PHOTO><BINVAL>'.encode_base64($photo).'</BINVAL></PHOTO>';
124 } else { 125 } else {
125 $photo = ''; 126 $photo = '';
126 } 127 }
@@ -155,7 +156,6 @@ sub load_vcard {
155 .$photo 156 .$photo
156 .'<DESC>'._isdef($entry->get_value('description')).'</DESC>' 157 .'<DESC>'._isdef($entry->get_value('description')).'</DESC>'
157 .'</vCard>'; 158 .'</vCard>';
158 $logger->info($vCard);
159 undef($entry); 159 undef($entry);
160 undef($srch); 160 undef($srch);
161 return $vCard; 161 return $vCard;