forked from github/server
bugfix passwort für newbies
This commit is contained in:
parent
04d5ce1966
commit
4cbab2ffa6
|
@ -1868,7 +1868,7 @@ report(FILE *F, faction * f, const faction_list * addresses,
|
||||||
if (f->age <= 2) {
|
if (f->age <= 2) {
|
||||||
if (f->age <= 1) {
|
if (f->age <= 1) {
|
||||||
ADDMSG(&f->msgs, msg_message("changepasswd",
|
ADDMSG(&f->msgs, msg_message("changepasswd",
|
||||||
"value", gc_add(strdup(buf))));
|
"value", gc_add(strdup(f->passw))));
|
||||||
}
|
}
|
||||||
RENDER(f, buf, sizeof(buf), ("newbie_password", "password", f->passw));
|
RENDER(f, buf, sizeof(buf), ("newbie_password", "password", f->passw));
|
||||||
rnl(F);
|
rnl(F);
|
||||||
|
|
|
@ -2128,11 +2128,13 @@ readfaction(FILE * F)
|
||||||
}
|
}
|
||||||
f->lastorders = ri(F);
|
f->lastorders = ri(F);
|
||||||
f->age = ri(F);
|
f->age = ri(F);
|
||||||
|
/*
|
||||||
if (sqlstream && f->age==0) {
|
if (sqlstream && f->age==0) {
|
||||||
fprintf(sqlstream,
|
fprintf(sqlstream,
|
||||||
"UPDATE users SET status='ACTIVE' where email='%s';\n",
|
"UPDATE users SET status='ACTIVE' where email='%s';\n",
|
||||||
f->email);
|
f->email);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (global.data_version < NEWRACE_VERSION) {
|
if (global.data_version < NEWRACE_VERSION) {
|
||||||
race_t rc = (char) ri(F);
|
race_t rc = (char) ri(F);
|
||||||
f->race = new_race[rc];
|
f->race = new_race[rc];
|
||||||
|
|
|
@ -565,7 +565,7 @@ confirm_newbies(void)
|
||||||
const faction * f = factions;
|
const faction * f = factions;
|
||||||
while (f) {
|
while (f) {
|
||||||
if (f->age==0) {
|
if (f->age==0) {
|
||||||
fprintf(sqlstream, "UPDATE subscriptions SET status='ACTIVE', faction='%s' WHERE game=%d;\n", itoa36(f->no), GAME_ID);
|
fprintf(sqlstream, "UPDATE subscriptions SET status='ACTIVE', faction='%s' WHERE game=%d AND password='%s';\n", itoa36(f->no), GAME_ID, f->passw);
|
||||||
}
|
}
|
||||||
f = f->next;
|
f = f->next;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue