#include "webcit.h"
#include "webserver.h"
-
+CtxType CTX_USERLIST = CTX_NONE;
/*
* show a list of available users to edit them
* message the header message???
long len;
GetTemplateTokenString(Target, TP, 0, &who, &len);
+ if (len == 0) {
+ who = ChrPtr(WC->wc_fullname);
+ }
Buf = NewStrBuf();
serv_printf("RBIO %s", who);
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;
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);
InitModule_USEREDIT
(void)
{
+ RegisterCTX(CTX_USERLIST);
WebcitAddUrlHandler(HKEY("select_user_to_edit"), "", 0, _select_user_to_edit, 0);
WebcitAddUrlHandler(HKEY("display_edituser"), "", 0, _display_edituser, 0);
WebcitAddUrlHandler(HKEY("edituser"), "", 0, edituser, 0);
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);