/** * Execute the action */ public function execute() { $email = $this->getParameter('email', 'string'); // does the user exist if ($email !== null) { parent::execute(); // delete item if (BackendUsersModel::undoDelete($email)) { // get user $user = new BackendUser(null, $email); // item was deleted, so redirect $this->redirect(BackendModel::createURLForAction('edit') . '&id=' . $user->getUserId() . '&report=restored&var=' . $user->getSetting('nickname') . '&highlight=row-' . $user->getUserId()); } else { $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing'); } } else { $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing'); } }