$Id$
+Tue Nov 1 22:30:15 EST 2005 ajc
+* useredit.c: added in the missing "Permission to send Internet mail"
+ option for editing a user account.
+
Mon Oct 31 22:29:39 EST 2005 ajc
* messages.c: the summary line for each message is now a SPAN instead of
a DIV. This was done because we needed the SPAN anyway to apply styles,
* to send the user to the vCard editor next.
*/
void display_edituser(char *supplied_username, int is_new) {
- char buf[SIZ];
- char error_message[SIZ];
+ char buf[1024];
+ char error_message[1024];
time_t now;
- char username[SIZ];
- char password[SIZ];
+ char username[256];
+ char password[256];
unsigned int flags;
int timescalled;
int msgsposted;
escputs(password);
wprintf("\" MAXLENGTH=\"20\"></TD></TR>\n");
+ wprintf("<tr><td>");
+ wprintf(_("Permission to send Internet mail"));
+ wprintf("</td><td>");
+ wprintf("<input type=\"checkbox\" name=\"inetmail\" value=\"yes\" ");
+ if (flags & US_INTERNET) {
+ wprintf("CHECKED ");
+ }
+ wprintf("></td></tr>\n");
+
wprintf("<TR><TD>");
wprintf(_("Number of logins"));
wprintf("</TD><TD>"
char message[SIZ];
char buf[SIZ];
int is_new = 0;
+ unsigned int flags = 0;
is_new = atoi(bstr("is_new"));
safestrncpy(message, _("Changes were not saved."), sizeof message);
}
else {
+ flags = atoi(bstr("flags"));
+ if (!strcasecmp(bstr("inetmail"), "yes")) {
+ flags |= US_INTERNET;
+ }
+ else {
+ flags &= ~US_INTERNET ;
+ }
- serv_printf("ASUP %s|%s|%s|%s|%s|%s|%s|%s|%s|",
+ serv_printf("ASUP %s|%s|%d|%s|%s|%s|%s|%s|%s|",
bstr("username"),
bstr("password"),
- bstr("flags"),
+ flags,
bstr("timescalled"),
bstr("msgsposted"),
bstr("axlevel"),
#define UA_ZAPPED 16
+/*
+ * User flags (from Citadel)
+ */
+#define US_NEEDVALID 1 /* User needs to be validated */
+#define US_PERM 4 /* Permanent user */
+#define US_LASTOLD 16 /* Print last old message with new */
+#define US_EXPERT 32 /* Experienced user */
+#define US_UNLISTED 64 /* Unlisted userlog entry */
+#define US_NOPROMPT 128 /* Don't prompt after each message */
+#define US_PROMPTCTL 256 /* <N>ext & <S>top work at prompt */
+#define US_DISAPPEAR 512 /* Use "disappearing msg prompts" */
+#define US_REGIS 1024 /* Registered user */
+#define US_PAGINATOR 2048 /* Pause after each screen of text */
+#define US_INTERNET 4096 /* Internet mail privileges */
+#define US_FLOORS 8192 /* User wants to see floors */
+#define US_COLOR 16384 /* User wants ANSI color support */
+#define US_USER_SET (US_LASTOLD | US_EXPERT | US_UNLISTED | \
+ US_NOPROMPT | US_DISAPPEAR | US_PAGINATOR | \
+ US_FLOORS | US_COLOR | US_PROMPTCTL )