assertRouteAccess('users'); $this->setTitle(t('User')); $name = $this->params->shiftRequired('name'); $query = User::on($this->getDb()); $query->getSelectBase() ->where(['user.name = ?' => $name]); $this->applyRestrictions($query); $user = $query->first(); if ($user === null) { throw new NotFoundError(t('User not found')); } $this->user = $user; } public function indexAction() { $this->addControl((new UserList([$this->user]))->setNoSubjectLink()->setDetailActionsDisabled()); $this->addContent(new UserDetail($this->user)); $this->setAutorefreshInterval(10); } }