Calendar: Avoid error if $userid is not numeric

This commit is contained in:
nathan 2021-12-15 14:50:43 -07:00
parent 0a6dbbcd28
commit 4bf0258f14

View File

@ -1069,7 +1069,7 @@ class calendar_boupdate extends calendar_bo
$event_arr = null;
$details = $this->_get_event_details(isset($cleared_event) ? $cleared_event : $event,
$action, $event_arr, $disinvited);
$details['fullname'] = Api\Accounts::username($userid);
$details['fullname'] = is_numeric($userid) ? Api\Accounts::username($userid) : $fullname;
$details['to-fullname'] = $fullname;
$details['to-firstname'] = isset($tfn)? $tfn: '';
$details['to-lastname'] = isset($tln)? $tln: '';