summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-04-09 11:25:59 +0800
committerwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-04-09 11:25:59 +0800
commit320da42e1169e6a786522035d40ba6d71460634f (patch)
treeac5d1f32a73a92a2d0be2af692654940cad8f6d8 /mbbsd
parent0962d524ea670b14e820b287f34078f4957f48a7 (diff)
downloadpttbbs-320da42e1169e6a786522035d40ba6d71460634f.tar
pttbbs-320da42e1169e6a786522035d40ba6d71460634f.tar.gz
pttbbs-320da42e1169e6a786522035d40ba6d71460634f.tar.bz2
pttbbs-320da42e1169e6a786522035d40ba6d71460634f.tar.lz
pttbbs-320da42e1169e6a786522035d40ba6d71460634f.tar.xz
pttbbs-320da42e1169e6a786522035d40ba6d71460634f.tar.zst
pttbbs-320da42e1169e6a786522035d40ba6d71460634f.zip
seperate email modification
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3501 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/user.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c
index d639dc3d..e5d00208 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -648,8 +648,8 @@ uinfo_query(userec_t *u, int adminmode, int unum)
memcpy(&x, u, sizeof(userec_t));
ans = getans(adminmode ?
"(1)改資料(2)設密碼(3)設權限(4)砍帳號(5)改ID"
- "(6)殺/復活寵物(7)審判 [0]結束 " :
- "請選擇 (1)修改資料 (2)設定密碼 (C) 個人化設定 ==> [0]結束 ");
+ "(6)殺/復活寵物(7)審判(M)改信箱 [0]結束 " :
+ "請選擇 (1)修改資料 (2)設定密碼 (M)修改信箱 (C) 個人化設定 ==> [0]結束 ");
if (ans > '2' && ans != 'C' && ans != 'c' && !adminmode)
ans = '0';
@@ -666,6 +666,18 @@ uinfo_query(userec_t *u, int adminmode, int unum)
case 'c':
Customize();
return;
+ case 'm':
+ case 'M':
+ do {
+ getdata_str(i, 0, "電子信箱[變動要重新認證]:", buf, 50, DOECHO,
+ x.email);
+ } while (!isvalidemail(buf) && vmsg("認證信箱不能用使用免費信箱"));
+ i++;
+ if (strcmp(buf, x.email) && strchr(buf, '@')) {
+ strlcpy(x.email, buf, sizeof(x.email));
+ mail_changed = 1 - adminmode;
+ }
+ break;
case '7':
violate_law(&x, unum);
return;
@@ -684,16 +696,6 @@ uinfo_query(userec_t *u, int adminmode, int unum)
snprintf(buf, sizeof(buf), "%010d", x.mobile);
getdata_buf(i++, 0, "手機號碼:", buf, 11, LCECHO);
x.mobile = atoi(buf);
- do
- {
- getdata_str(i, 0, "電子信箱[變動要重新認證]:", buf, 50, DOECHO,
- x.email);
- }while(!isvalidemail(buf) && vmsg("認證信箱不能用使用免費信箱"));
- i++;
- if (strcmp(buf, x.email) && strchr(buf, '@')) {
- strlcpy(x.email, buf, sizeof(x.email));
- mail_changed = 1 - adminmode;
- }
snprintf(genbuf, sizeof(genbuf), "%i", (u->sex + 1) % 8);
getdata_str(i++, 0, "性別 (1)葛格 (2)姐接 (3)底迪 (4)美眉 (5)薯叔 "
"(6)阿姨 (7)植物 (8)礦物:",