When checking to see whether the user is saving a new
authorArt Cancro <ajc@citadel.org>
Thu, 12 Apr 2007 14:40:14 +0000 (14:40 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 12 Apr 2007 14:40:14 +0000 (14:40 +0000)
vcard to My Citadel Config, only prohibit saving messages
to that room when it's actually a vCard.

citadel/serv_vcard.c

index cc3e49bd0ad759c3c61f4d642901f3efdb9e93c3..ec8089d392d13f57e7bf279db95a10ca04af62b6 100644 (file)
@@ -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);