diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-03-31 00:50:34 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-03-31 00:50:34 +0800 |
commit | 98acb18b8e6b7d7bfdd49809774e61328ef7f7a5 (patch) | |
tree | e1f04943a2f84e4755ee13de50aa1f6acde2d951 /mbbsd/register.c | |
parent | eb94f525ab29b0c82e70fa895d2e343047fefd26 (diff) | |
download | pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.gz pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.bz2 pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.lz pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.xz pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.zst pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.zip |
add mmap to cuser get ride of passwd_update
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1640 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/register.c')
-rw-r--r-- | mbbsd/register.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/mbbsd/register.c b/mbbsd/register.c index 0580e485..53de740e 100644 --- a/mbbsd/register.c +++ b/mbbsd/register.c @@ -278,7 +278,7 @@ new_register() exit(1); } setuserid(allocid, newuser.userid); - if( (uid = dosearchuser(newuser.userid)) ) + if( (uid = initcuser(newuser.userid)) ) setumoney(uid, 0); else{ fprintf(stderr, "無法建立帳號\n"); @@ -304,33 +304,33 @@ check_register() stand_title("請詳細填寫個人資料"); - while (strlen(cuser.username) < 2) - getdata(2, 0, "綽號暱稱:", cuser.username, - sizeof(cuser.username), DOECHO); + while (strlen(cuser->username) < 2) + getdata(2, 0, "綽號暱稱:", cuser->username, + sizeof(cuser->username), DOECHO); - for (ptr = cuser.username; *ptr; ptr++) { + for (ptr = cuser->username; *ptr; ptr++) { if (*ptr == 9) /* TAB convert */ *ptr = ' '; } - while (strlen(cuser.realname) < 4) - getdata(4, 0, "真實姓名:", cuser.realname, - sizeof(cuser.realname), DOECHO); + while (strlen(cuser->realname) < 4) + getdata(4, 0, "真實姓名:", cuser->realname, + sizeof(cuser->realname), DOECHO); - while (strlen(cuser.address) < 8) - getdata(6, 0, "聯絡地址:", cuser.address, - sizeof(cuser.address), DOECHO); + while (strlen(cuser->address) < 8) + getdata(6, 0, "聯絡地址:", cuser->address, + sizeof(cuser->address), DOECHO); /* - * if(!strchr(cuser.email, '@')) { bell(); move(t_lines - 4, 0); prints(" + * if(!strchr(cuser->email, '@')) { bell(); move(t_lines - 4, 0); prints(" * 您的權益,請填寫真實的 E-mail address," "以資確認閣下身份,\n" " * 033[44muser@domain_name\033[0m 或 \033[44muser" * "@\\[ip_number\\]\033[0m。\n\n" "※ 如果您真的沒有 E-mail, turn] * 即可。"); * - * do { getdata(8, 0, "電子信箱:", cuser.email, sizeof(cuser.email), - * DOECHO); if(!cuser.email[0]) sprintf(cuser.email, "%s%s", - * cuser.userid, str_mail_address); } while(!strchr(cuser.email, '@')); + * do { getdata(8, 0, "電子信箱:", cuser->email, sizeof(cuser->email), + * DOECHO); if(!cuser->email[0]) sprintf(cuser->email, "%s%s", + * cuser->userid, str_mail_address); } while(!strchr(cuser->email, '@')); * * } */ if (!HAS_PERM(PERM_SYSOP)) { @@ -342,8 +342,8 @@ check_register() u_register(); #ifdef NEWUSER_LIMIT - if (cuser.lastlogin - cuser.firstlogin < 3 * 86400) - cuser.userlevel &= ~PERM_POST; + if (cuser->lastlogin - cuser->firstlogin < 3 * 86400) + cuser->userlevel &= ~PERM_POST; more("etc/newuser", YEA); #endif } |