diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-09-12 10:56:48 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-09-12 10:56:48 +0800 |
commit | dad8413c82256a8701ab58b2adc6317ec9e1c033 (patch) | |
tree | 6eb271f425e6ad9ccc568677ed8857510b1d36e4 | |
parent | 4053b71e074aff7cdc5cc0ac4d7c7292e6e16923 (diff) | |
download | pttbbs-dad8413c82256a8701ab58b2adc6317ec9e1c033.tar pttbbs-dad8413c82256a8701ab58b2adc6317ec9e1c033.tar.gz pttbbs-dad8413c82256a8701ab58b2adc6317ec9e1c033.tar.bz2 pttbbs-dad8413c82256a8701ab58b2adc6317ec9e1c033.tar.lz pttbbs-dad8413c82256a8701ab58b2adc6317ec9e1c033.tar.xz pttbbs-dad8413c82256a8701ab58b2adc6317ec9e1c033.tar.zst pttbbs-dad8413c82256a8701ab58b2adc6317ec9e1c033.zip |
* add check for ambiguous id in case user cheat on admins
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@4833 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/user.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pttbbs/mbbsd/user.c b/pttbbs/mbbsd/user.c index edfbc17f..29803db1 100644 --- a/pttbbs/mbbsd/user.c +++ b/pttbbs/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)); } |