Skip to content
Snippets Groups Projects
Commit 861a2441 authored by JediKev's avatar JediKev
Browse files

issue: Delete User Error

This addresses an issue reported on the forum where deleting a User will
throw a fatal error. This was caused by 4558 where the `state` column was
mistakenly overwritten with `event_id`. In addition, this changes `$deleted`
to `$status_id` for better readability.
parent 3f05f70d
No related branches found
No related tags found
No related merge requests found
......@@ -635,12 +635,11 @@ implements TemplateVariable, Searchable {
}
function deleteAllTickets() {
$event_id = Event::getIdByName('deleted');
$deleted = TicketStatus::lookup(array('event_id' => $event_id));
$status_id = TicketStatus::lookup(array('state' => 'deleted'));
foreach($this->tickets as $ticket) {
if (!$T = Ticket::lookup($ticket->getId()))
continue;
if (!$T->setStatus($deleted))
if (!$T->setStatus($status_id))
return false;
}
$this->tickets->reset();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment