summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-06-26 10:09:06 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-06-26 10:09:06 +0800
commit0547e1ba65aaf7a6ca53b440ffc014546b307227 (patch)
tree9d3caca6d70cb51c3638b05e04065e5dff9d52e0 /mbbsd
parent1e62bdbccfcffeba3ab2bbadf1bcb5676b9cc5af (diff)
downloadpttbbs-0547e1ba65aaf7a6ca53b440ffc014546b307227.tar
pttbbs-0547e1ba65aaf7a6ca53b440ffc014546b307227.tar.gz
pttbbs-0547e1ba65aaf7a6ca53b440ffc014546b307227.tar.bz2
pttbbs-0547e1ba65aaf7a6ca53b440ffc014546b307227.tar.lz
pttbbs-0547e1ba65aaf7a6ca53b440ffc014546b307227.tar.xz
pttbbs-0547e1ba65aaf7a6ca53b440ffc014546b307227.tar.zst
pttbbs-0547e1ba65aaf7a6ca53b440ffc014546b307227.zip
fix bug( Admin -> SetUserPasswd )
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@355 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/user.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 0ba23981..786de5de 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -1,4 +1,4 @@
-/* $Id: user.c,v 1.24 2002/06/21 09:08:35 bbs Exp $ */
+/* $Id: user.c,v 1.25 2002/06/26 02:09:06 in2 Exp $ */
#include "bbs.h"
static char *sex[8] = {
@@ -192,12 +192,12 @@ static void violate_law(userec_t *u, int unum){
void uinfo_query(userec_t *u, int real, int unum) {
userec_t x;
register int i = 0, fail, mail_changed;
+ int uid;
char ans[4], buf[STRLEN], *p;
char genbuf[200], reason[50];
unsigned long int money = 0;
fileheader_t fhdr;
int flag = 0, temp = 0, money_change = 0;
- time_t now;
FILE *fp;
@@ -367,7 +367,6 @@ void uinfo_query(userec_t *u, int real, int unum) {
}
else{
char witness[3][32];
- now= time(0);
for(i=0;i<3;i++){
if(!getdata(19+i, 0, "請輸入協助證明之使用者:",
witness[i], sizeof(witness[i]), DOECHO)){
@@ -375,14 +374,18 @@ void uinfo_query(userec_t *u, int real, int unum) {
fail++;
break;
}
- else if (!getuser(witness[i])){
+ else if( !(uid = getuser(witness[i])) ){
outs("\n查無此使用者\n");
fail++;
break;
}
- else if (now - u->firstlogin < 6*30*24*60*60){
- outs("\n註冊未超過半年,請重新輸入\n");
- i--;
+ else {
+ userec_t atuser;
+ passwd_query(uid, &atuser);
+ if (now - atuser.firstlogin < 6*30*24*60*60){
+ outs("\n註冊未超過半年,請重新輸入\n");
+ i--;
+ }
}
}
if (i < 3)