summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-09-12 10:56:48 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-09-12 10:56:48 +0800
commitf5347aad881a4b3bf73f4df3a405552610bf1d35 (patch)
treeb59f596a4423176a139eb0b32cc7f3f59deffe27
parent5ced3cc060a1eb16d2821b8a57faec839748944a (diff)
downloadpttbbs-f5347aad881a4b3bf73f4df3a405552610bf1d35.tar
pttbbs-f5347aad881a4b3bf73f4df3a405552610bf1d35.tar.gz
pttbbs-f5347aad881a4b3bf73f4df3a405552610bf1d35.tar.bz2
pttbbs-f5347aad881a4b3bf73f4df3a405552610bf1d35.tar.lz
pttbbs-f5347aad881a4b3bf73f4df3a405552610bf1d35.tar.xz
pttbbs-f5347aad881a4b3bf73f4df3a405552610bf1d35.tar.zst
pttbbs-f5347aad881a4b3bf73f4df3a405552610bf1d35.zip
* add check for ambiguous id in case user cheat on admins
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4833 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/user.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c
index edfbc17f..29803db1 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -1113,6 +1113,12 @@ uinfo_query(const char *orig_uid, int adminmode, int unum)
if (searchuser(genbuf, NULL)) {
outs("錯誤! 已經有同樣 ID 的使用者");
fail++;
+#if !defined(NO_CHECK_AMBIGUOUS_USERID) && defined(USE_REGCHECKD)
+ } else if ( regcheck_ambiguous_userid_exist(genbuf) > 0 &&
+ vans("此代號過於近似它人帳號,確定使用者沒有要幹壞事嗎? [y/N] ") != 'y')
+ {
+ fail++;
+#endif
} else
strlcpy(x.userid, genbuf, sizeof(x.userid));
}