From: Art Cancro Date: Thu, 12 Apr 2007 14:40:14 +0000 (+0000) Subject: When checking to see whether the user is saving a new X-Git-Tag: v7.86~3445 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=fe04213bc2d1c7ad4415b9ee7a260c3107e16d1b;p=citadel.git When checking to see whether the user is saving a new vcard to My Citadel Config, only prohibit saving messages to that room when it's actually a vCard. --- diff --git a/citadel/serv_vcard.c b/citadel/serv_vcard.c index cc3e49bd0..ec8089d39 100644 --- a/citadel/serv_vcard.c +++ b/citadel/serv_vcard.c @@ -314,10 +314,6 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) { } #endif - /* If users cannot create their own accounts, they cannot re-register either. */ - if ( (config.c_disable_newu) && (CC->user.axlevel < 6) ) { - return(1); - } } /* Is this a room with an address book in it? */ @@ -348,6 +344,11 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) { if (v == NULL) return(0); /* no vCards were found in this message */ + /* If users cannot create their own accounts, they cannot re-register either. */ + if ( (yes_my_citadel_config) && (config.c_disable_newu) && (CC->user.axlevel < 6) ) { + return(1); + } + s = vcard_get_prop(v, "FN", 0, 0, 0); if (s) lprintf(CTDL_DEBUG, "vCard beforesave hook running for <%s>\n", s);