X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fvcard%2Fserv_vcard.c;h=4e41299808a55b571ae1f97dbe06c0d5cd97d68e;hb=101a081c8c4cc505daf9e102d2b7567cc6194cf2;hp=18b30ae6eadb883d1b301b36e469b5fde8af4991;hpb=c2a329d11a3ef37971f567cc10ac42c42342a96b;p=citadel.git diff --git a/citadel/modules/vcard/serv_vcard.c b/citadel/modules/vcard/serv_vcard.c index 18b30ae6e..4e4129980 100644 --- a/citadel/modules/vcard/serv_vcard.c +++ b/citadel/modules/vcard/serv_vcard.c @@ -4,7 +4,7 @@ * A server-side module for Citadel which supports address book information * using the standard vCard format. * - * Copyright (c) 1999-2007 / released under the GNU General Public License + * Copyright (c) 1999-2009 / released under the GNU General Public License v3 */ /* @@ -61,11 +61,9 @@ #include "msgbase.h" #include "internet_addressing.h" #include "serv_vcard.h" - +#include "citadel_ldap.h" #include "ctdl_module.h" - - /* * set global flag calling for an aide to validate new users */ @@ -83,8 +81,7 @@ void set_mm_valid(void) { * Extract Internet e-mail addresses from a message containing a vCard, and * perform a callback for any found. */ -void vcard_extract_internet_addresses(struct CtdlMessage *msg, - void (*callback)(char *, char *) ) { +void vcard_extract_internet_addresses(struct CtdlMessage *msg, void (*callback)(char *, char *) ) { struct vCard *v; char *s; char *k; @@ -1192,11 +1189,12 @@ void vcard_session_login_hook(void) { * into the user's vCard. */ if ((config.c_auth_mode == AUTHMODE_LDAP) || (config.c_auth_mode == AUTHMODE_LDAP_AD)) { - - /* FIXME do something with this. - * The DN of the account will be found in: CCC->ldap_dn - */ - + v = vcard_get_user(&CCC->user); + if (v) { + if (Ctdl_LDAP_to_vCard(CCC->ldap_dn, v)) { + vcard_write_user(&CCC->user, v); + } + } } #endif