protected function retreiveUser($id) { $user = $this->handler->users()->find($id); if ($user === null) { $user = $this->handler->users()->where(['displayName' => $id]); } if ($user === null) { throw new UserNotFoundException(); } return $user; }