mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-17 19:23:27 +02:00
More changes to deleted characters (Account, guilds)
Account: Cannot change name, comment, gender + Cannot be deleted if owns a guild Guilds: Cannot create, cannot be invited, cannot accept invite, cannot be passed leadership to
This commit is contained in:
@@ -31,6 +31,14 @@ if(isset($_POST['deletecharactersave']) && $_POST['deletecharactersave'] == 1) {
|
||||
}
|
||||
}
|
||||
|
||||
$ownerid = 'ownerid';
|
||||
if($db->hasColumn('guilds', 'owner_id'))
|
||||
$ownerid = 'owner_id';
|
||||
$guild = $db->query('SELECT `name` FROM `guilds` WHERE `' . $ownerid . '` = '.$player->getId());
|
||||
if($guild->rowCount() > 0) {
|
||||
$errors[] = 'You cannot delete a character when they own a guild.';
|
||||
}
|
||||
|
||||
if(empty($errors)) {
|
||||
//dont show table "delete character" again
|
||||
$show_form = false;
|
||||
|
Reference in New Issue
Block a user