summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2013-10-04 20:28:55 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2013-10-04 20:28:55 +0800
commit0108d3c86b9afc95bc3128084c80a532a079c27b (patch)
treef5a55983ffecdd33b7e5b24749b000f8516c9736
parent5b3946cce04eb40fa0ec143ef2099e9193e2ab91 (diff)
downloadpttbbs-0108d3c86b9afc95bc3128084c80a532a079c27b.tar
pttbbs-0108d3c86b9afc95bc3128084c80a532a079c27b.tar.gz
pttbbs-0108d3c86b9afc95bc3128084c80a532a079c27b.tar.bz2
pttbbs-0108d3c86b9afc95bc3128084c80a532a079c27b.tar.lz
pttbbs-0108d3c86b9afc95bc3128084c80a532a079c27b.tar.xz
pttbbs-0108d3c86b9afc95bc3128084c80a532a079c27b.tar.zst
pttbbs-0108d3c86b9afc95bc3128084c80a532a079c27b.zip
Fix over_18 being randomly assigned after filling registration form.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5882 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/include/proto.h3
-rw-r--r--pttbbs/mbbsd/passwd.c4
-rw-r--r--pttbbs/mbbsd/register.c3
3 files changed, 1 insertions, 9 deletions
diff --git a/pttbbs/include/proto.h b/pttbbs/include/proto.h
index c7ac9a39..8dea64e9 100644
--- a/pttbbs/include/proto.h
+++ b/pttbbs/include/proto.h
@@ -162,8 +162,6 @@ int p_cloak(void);
int p_from(void);
int p_exmail(void);
int mail_redenvelop(const char* from, const char* to, int money, char *fpath);
-void resolve_over18(void);
-int resolve_over18_user(const userec_t *u);
char *get_restriction_reason(
unsigned int numlogindays,
unsigned int badpost,
@@ -809,7 +807,6 @@ int pwcuRegisterSetInfo (const char *rname,
const char *phone,
const char *email,
int mobile,
- int over_18,
uint8_t is_foreign);
// non-important based variables (only save on exit)
diff --git a/pttbbs/mbbsd/passwd.c b/pttbbs/mbbsd/passwd.c
index a50100cf..e7b7185e 100644
--- a/pttbbs/mbbsd/passwd.c
+++ b/pttbbs/mbbsd/passwd.c
@@ -265,7 +265,6 @@ int pwcuRegisterSetInfo (const char *rname,
const char *phone,
const char *email,
int mobile,
- int over_18,
uint8_t is_foreign)
{
PWCU_START();
@@ -275,18 +274,15 @@ int pwcuRegisterSetInfo (const char *rname,
strlcpy(u.phone, phone, sizeof(u.phone));
strlcpy(u.email, email, sizeof(u.email));
u.mobile = mobile;
- u.over_18 = over_18;
_SETBY_BIT(u.uflag, UF_FOREIGN, is_foreign);
// duplicate to cuser
-
strlcpy(cuser.realname, rname, sizeof(cuser.realname));
strlcpy(cuser.address, addr, sizeof(cuser.address));
strlcpy(cuser.career, career, sizeof(cuser.career));
strlcpy(cuser.phone, phone, sizeof(cuser.phone));
strlcpy(cuser.email, email, sizeof(cuser.email));
cuser.mobile = mobile;
- cuser.over_18 = over_18;
_SETBY_BIT(cuser.uflag, UF_FOREIGN, is_foreign);
PWCU_END();
diff --git a/pttbbs/mbbsd/register.c b/pttbbs/mbbsd/register.c
index c4d90fdc..03ae6e9c 100644
--- a/pttbbs/mbbsd/register.c
+++ b/pttbbs/mbbsd/register.c
@@ -1116,7 +1116,6 @@ u_register(void)
{
char rname[20], addr[50], mobile[16];
char phone[20], career[40], email[50];
- int over18;
char inregcode[14], regcode[50];
char ans[3], *errcode;
int i = 0;
@@ -1381,7 +1380,7 @@ u_register(void)
// copy values to cuser
pwcuRegisterSetInfo(rname, addr, career, phone, email,
- atoi(mobile), over18, isForeign);
+ atoi(mobile), isForeign);
// if reach here, email is apparently 'x'.
toregister(email);