summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-10 14:42:42 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-10 14:42:42 +0800
commit7146b73880e5f21507b848ae4095c63c991943b3 (patch)
treeb9eb6793df0449b2540b34a2a507b936531c62ce
parent23203492b9e7df03c4b07e7eae5afa145da138ed (diff)
downloadpttbbs-7146b73880e5f21507b848ae4095c63c991943b3.tar
pttbbs-7146b73880e5f21507b848ae4095c63c991943b3.tar.gz
pttbbs-7146b73880e5f21507b848ae4095c63c991943b3.tar.bz2
pttbbs-7146b73880e5f21507b848ae4095c63c991943b3.tar.lz
pttbbs-7146b73880e5f21507b848ae4095c63c991943b3.tar.xz
pttbbs-7146b73880e5f21507b848ae4095c63c991943b3.tar.zst
pttbbs-7146b73880e5f21507b848ae4095c63c991943b3.zip
- register: fix 'x'/default being rejected in user->changemail
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4288 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/user.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c
index ffa5c235..077a9d44 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -603,7 +603,13 @@ uinfo_query(userec_t *u, int adminmode, int unum)
do {
getdata_str(y, 0, "電子信箱 [變動要重新認證]:", buf,
sizeof(x.email), DOECHO, x.email);
+
strip_blank(buf, buf);
+
+ // fast break
+ if (!buf[0] || strcasecmp(buf, "x") == 0)
+ break;
+
// TODO 這裡也要 emaildb_check
#ifdef USE_EMAILDB
if (isvalidemail(buf))
@@ -620,8 +626,10 @@ uinfo_query(userec_t *u, int adminmode, int unum)
#endif
} while (!isvalidemail(buf) && vmsg("認證信箱不能用使用免費信箱"));
y++;
+
// admins may want to use special names
- if (strcmp(buf, x.email) &&
+ if (buf[0] &&
+ strcmp(buf, x.email) &&
(strchr(buf, '@') || adminmode)) {
// TODO 這裡也要 emaildb_check