summaryrefslogtreecommitdiffstats
path: root/mbbsd/user.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-02-01 18:32:24 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-02-01 18:32:24 +0800
commitaf6e9ec70228249a462a9a4fd5aa4977733f9e13 (patch)
tree75cb354a07fe869816c457fa12c4cdb2531b74dc /mbbsd/user.c
parent463cdbbc77d5b00b8f6693e7ea6cb6b9c53be081 (diff)
downloadpttbbs-af6e9ec70228249a462a9a4fd5aa4977733f9e13.tar
pttbbs-af6e9ec70228249a462a9a4fd5aa4977733f9e13.tar.gz
pttbbs-af6e9ec70228249a462a9a4fd5aa4977733f9e13.tar.bz2
pttbbs-af6e9ec70228249a462a9a4fd5aa4977733f9e13.tar.lz
pttbbs-af6e9ec70228249a462a9a4fd5aa4977733f9e13.tar.xz
pttbbs-af6e9ec70228249a462a9a4fd5aa4977733f9e13.tar.zst
pttbbs-af6e9ec70228249a462a9a4fd5aa4977733f9e13.zip
- user: prevent printing zeros if mobile has not been set
- register: force user to update birthday information. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3898 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/user.c')
-rw-r--r--mbbsd/user.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 9ad49259..09fa58e3 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -726,7 +726,9 @@ uinfo_query(userec_t *u, int adminmode, int unum)
getdata_buf(y++, 0, "居住地址:",
x.address, sizeof(x.address), DOECHO);
}
- snprintf(buf, sizeof(buf), "%010d", x.mobile);
+ buf[0] = 0;
+ if (x.mobile)
+ snprintf(buf, sizeof(buf), "%010d", x.mobile);
getdata_buf(y++, 0, "手機號碼:", buf, 11, LCECHO);
x.mobile = atoi(buf);
snprintf(genbuf, sizeof(genbuf), "%d", (u->sex + 1) % 8);