Skip to content
Snippets Groups Projects
Commit d7cc6a58 authored by Jared Hancock's avatar Jared Hancock
Browse files

events: Fix crash rendering thread for events with deleted users

parent 894c1f64
No related branches found
No related tags found
No related merge requests found
......@@ -1574,9 +1574,9 @@ class ThreadEvent extends VerySimpleModel {
function getUserName() {
if ($this->uid && $this->uid_type == 'S')
return $this->agent->getName();
return $this->agent ? $this->agent->getName() : $this->username;
if ($this->uid && $this->uid_type == 'U')
return $this->user->getName();
return $this->user ? $this->user->getName() : $this->username;
return $this->username;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment