]> code.citadel.org Git - citadel.git/commitdiff
* Per-user and global flags calling for validation need to be set in the
authorArt Cancro <ajc@citadel.org>
Wed, 25 Jun 2003 02:40:05 +0000 (02:40 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 25 Jun 2003 02:40:05 +0000 (02:40 +0000)
  vCard upload thingie, not in the wrapper function that emulates the
  deprecated REGI server command.  Moved it to the correct place.

citadel/ChangeLog
citadel/serv_vcard.c

index e47f80ffcdad690b87db4c682f85bc6862b3532a..2813f2c277f68104979ce03521eb106333e5239c 100644 (file)
@@ -1,4 +1,9 @@
  $Log$
+ Revision 607.6  2003/06/25 02:40:05  ajc
+ * Per-user and global flags calling for validation need to be set in the
+   vCard upload thingie, not in the wrapper function that emulates the
+   deprecated REGI server command.  Moved it to the correct place.
+
  Revision 607.5  2003/06/22 20:49:31  error
  * citadel.c: display idle times in wholist up to 999 days
 
@@ -4780,4 +4785,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 6350dbfc57f364fa60813c95784ae7c70c6220c3..6aeab4f0a0453cc4d275a94fdeaf8443f8b292fe 100644 (file)
@@ -73,6 +73,19 @@ unsigned long SYM_VCARD;
 #define VC ((struct vcard_internal_info *)CtdlGetUserData(SYM_VCARD))
 
 
+/*
+ * set global flag calling for an aide to validate new users
+ */
+void set_mm_valid(void) {
+       begin_critical_section(S_CONTROL);
+       get_control();
+       CitControl.MMflags = CitControl.MMflags | MM_VALID ;
+       put_control();
+       end_critical_section(S_CONTROL);
+}
+
+
+
 /*
  * Extract Internet e-mail addresses from a message containing a vCard, and
  * perform a callback for any found.
@@ -374,6 +387,16 @@ int vcard_upload_aftersave(struct CtdlMessage *msg) {
                        vcard_populate_cs_inet_email(v);
                        vcard_free(v);
 
+                       /* Some sites want an Aide to be notified when a
+                        * user registers or re-registers...
+                        */
+                       set_mm_valid();
+
+                       /* ...which also means we need to flag the user */
+                       lgetuser(&CC->usersupp, CC->curr_user);
+                       CC->usersupp.flags |= (US_REGIS|US_NEEDVALID);
+                       lputuser(&CC->usersupp);
+
                        return(0);
                }
 
@@ -528,21 +551,9 @@ void cmd_regi(char *argbuf) {
        vcard_set_prop(my_vcard, "adr", tmpaddress, 0);
        vcard_write_user(&CC->usersupp, my_vcard);
        vcard_free(my_vcard);
-
-       lgetuser(&CC->usersupp, CC->curr_user);
-       CC->usersupp.flags=(CC->usersupp.flags|US_REGIS|US_NEEDVALID);
-       lputuser(&CC->usersupp);
-
-       /* set global flag calling for validation */
-       begin_critical_section(S_CONTROL);
-       get_control();
-       CitControl.MMflags = CitControl.MMflags | MM_VALID ;
-       put_control();
-       end_critical_section(S_CONTROL);
 }
 
 
-
 /*
  * Protocol command to fetch registration info for a user
  */