/** * Do not set page actions on the user page that hasn't been created yet. * * @inheritdoc * @param BaseTemplate $tpl */ protected function preparePageActions(BaseTemplate $tpl) { $setPageActions = true; if ($this->isUserPage) { if (!$this->getTitle()->exists()) { $setPageActions = false; } } if ($setPageActions) { parent::preparePageActions($tpl); } else { $tpl->set('page_actions', array()); } }