Unknown Soldier
Mapping a map
- Joined
- Oct 30, 2010
- Messages
- 293
- Solutions
- 11
- Reaction score
- 664
Hello,
while editing layout and "deleted" descriptions in both acc management and characters page I have found an unexpected problem... Characters which are deleted (deleted = 1 in database) can still login...
I am almost sure, that few weeks back when characters were deleted - they couldn't log in. Have not changed server, neither ACC... I have tried server backup from 1,5 months ago, and I was still abe to log in on a deleted characters.
Is this a problem with database, or rather is this something else?
Well, I have found a "walk around" solution... I still don't know why have this happened, and will be bumping this thread cause maybe someone knows the reason and maybe have a solution too.
In acc management file (Gesior) after:
I have added a line:
which sets players' "deletion" parameter to 1, which means it is deleted and not visible on player list (but still visible on website) in Tibia client. I think it is even better solution than original one, but the thing that deletion dissapeared somehow is bugging me anyway
If you want to keep "undelete" function, you can add the same line there, just changing 1 to 0.
@edit
I am not sure, if the value in 'deletion' should be set to '1', because cell ist set to big integer (15), and simple yes/no cells are set to tiny integer (1)... So if someone could correct me if Im wrong. Anyway, this solution seems to be working with value "1"
As I said, still looking for reason why have this happened!
while editing layout and "deleted" descriptions in both acc management and characters page I have found an unexpected problem... Characters which are deleted (deleted = 1 in database) can still login...
I am almost sure, that few weeks back when characters were deleted - they couldn't log in. Have not changed server, neither ACC... I have tried server backup from 1,5 months ago, and I was still abe to log in on a deleted characters.
Is this a problem with database, or rather is this something else?
Well, I have found a "walk around" solution... I still don't know why have this happened, and will be bumping this thread cause maybe someone knows the reason and maybe have a solution too.
In acc management file (Gesior) after:
PHP:
$player->set('deleted', 1);
PHP:
$SQL->query('UPDATE `players` SET `deletion` = 1 WHERE `id` = ' . $player->getID());
If you want to keep "undelete" function, you can add the same line there, just changing 1 to 0.
@edit
I am not sure, if the value in 'deletion' should be set to '1', because cell ist set to big integer (15), and simple yes/no cells are set to tiny integer (1)... So if someone could correct me if Im wrong. Anyway, this solution seems to be working with value "1"
As I said, still looking for reason why have this happened!
Last edited by a moderator: