]> code.citadel.org Git - citadel.git/blobdiff - webcit/useredit.c
Merge branch 'master' of ssh://git.citadel.org/appl/gitroot/citadel
[citadel.git] / webcit / useredit.c
index 9e70f81d3c5dbc0b7467365d4bd3ecc649884382..2751ecde955b70c7fe6d54c2d065fb1f422f13d7 100644 (file)
@@ -451,6 +451,9 @@ void tmplput_USER_BIO(StrBuf *Target, WCTemplputParams *TP)
        long len;
 
        GetTemplateTokenString(Target, TP, 0, &who, &len);
+       if (len == 0) {
+               who = ChrPtr(WC->wc_fullname);
+       }
 
        Buf = NewStrBuf();
        serv_printf("RBIO %s", who);
@@ -527,7 +530,7 @@ TRYAGAIN:
        Stat.lowest_found = (-1);
        Stat.highest_found = (-1);
        /* Search for the user's vCard */
-       if (load_msg_ptrs("MSGS ALL||||1", NULL, &Stat, NULL) > 0) {
+       if (load_msg_ptrs("MSGS ALL||||1", NULL, NULL, &Stat, NULL, NULL, NULL, NULL, 0) > 0) {
                at = GetNewHashPos(WCC->summ, 0);
                while (GetNextHashPos(WCC->summ, at, &HKLen, &HashKey, &vMsg)) {
                        Msg = (message_summary*) vMsg;          
@@ -576,7 +579,7 @@ TRYAGAIN:
                        serv_puts("000");
                }
                else 
-                       syslog(1, "Error while creating user vcard: %s\n", ChrPtr(Buf));
+                       syslog(LOG_WARNING, "Error while creating user vcard: %s\n", ChrPtr(Buf));
                goto TRYAGAIN;
        }
        FreeStrBuf(&Buf);
@@ -827,12 +830,12 @@ InitModule_USEREDIT
 
        RegisterNamespace("USER:BIO", 1, 2, tmplput_USER_BIO,  NULL, CTX_NONE);
 
-       RegisterConditional(HKEY("COND:USERNAME"),  0,    ConditionalUser, CTX_USERLIST);
-       RegisterConditional(HKEY("COND:USERACCESS"), 0,   ConditionalUserAccess, CTX_USERLIST);
-       RegisterConditional(HKEY("COND:USERLIST:FLAG:USE_INTERNET"), 0, ConditionalFlagINetEmail, CTX_USERLIST);
-       RegisterConditional(HKEY("COND:USERLIST:HAVEBIO"), 0, ConditionalHaveBIO, CTX_USERLIST);
+       RegisterConditional("COND:USERNAME",  0,    ConditionalUser, CTX_USERLIST);
+       RegisterConditional("COND:USERACCESS", 0,   ConditionalUserAccess, CTX_USERLIST);
+       RegisterConditional("COND:USERLIST:FLAG:USE_INTERNET", 0, ConditionalFlagINetEmail, CTX_USERLIST);
+       RegisterConditional("COND:USERLIST:HAVEBIO", 0, ConditionalHaveBIO, CTX_USERLIST);
 
-       RegisterConditional(HKEY("COND:USER:PIC"), 1, Conditional_USER_HAS_PIC,  CTX_NONE);
+       RegisterConditional("COND:USER:PIC", 1, Conditional_USER_HAS_PIC,  CTX_NONE);
 
        RegisterIterator("USERLIST", 0, NULL, iterate_load_userlist, NULL, DeleteHash, CTX_USERLIST, CTX_NONE, IT_FLAG_DETECT_GROUPCHANGE);