summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2010-10-16 22:55:24 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2010-10-16 22:55:24 +0800
commit991999e737bdd0879618e54df06d0d175e5c4f7b (patch)
tree511383be30390e008daf4f5308b2bb9e0c22856a
parent6d7fff69b37ca19eef32c0219af81c14bf3199dd (diff)
downloadpttbbs-991999e737bdd0879618e54df06d0d175e5c4f7b.tar
pttbbs-991999e737bdd0879618e54df06d0d175e5c4f7b.tar.gz
pttbbs-991999e737bdd0879618e54df06d0d175e5c4f7b.tar.bz2
pttbbs-991999e737bdd0879618e54df06d0d175e5c4f7b.tar.lz
pttbbs-991999e737bdd0879618e54df06d0d175e5c4f7b.tar.xz
pttbbs-991999e737bdd0879618e54df06d0d175e5c4f7b.tar.zst
pttbbs-991999e737bdd0879618e54df06d0d175e5c4f7b.zip
allow minimal id length customization
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5120 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/register.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pttbbs/mbbsd/register.c b/pttbbs/mbbsd/register.c
index ddcdec95..9549e30c 100644
--- a/pttbbs/mbbsd/register.c
+++ b/pttbbs/mbbsd/register.c
@@ -732,6 +732,10 @@ new_register(void)
if (bad_user_id(passbuf))
outs("無法接受這個代號,請使用英文字母,並且不要包含空格\n");
+#ifdef MIN_ALLOWED_ID_LEN
+ else if (strlen(passbuf) < MIN_ALLOWED_ID_LEN)
+ prints("代號過短,請使用 %d 個字元以上的代號\n", MIN_ALLOWED_ID_LEN);
+#endif
else if ((id = getuser(passbuf, &xuser)) &&
// >=: see check_and_expire_account definition
(minute = check_and_expire_account(id, &xuser, 0)) >= 0)