From f5347aad881a4b3bf73f4df3a405552610bf1d35 Mon Sep 17 00:00:00 2001 From: piaip Date: Sat, 12 Sep 2009 02:56:48 +0000 Subject: * 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 --- mbbsd/user.c | 6 ++++++ 1 file changed, 6 insertions(+) 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)); } -- cgit v1.2.3