From e33a15b0ed36dffb72e01523463378a84773f62d Mon Sep 17 00:00:00 2001 From: n1rwana Date: Thu, 16 Dec 2021 21:38:05 +0300 Subject: [PATCH] Update GroupPresenter.php --- Web/Presenters/GroupPresenter.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Web/Presenters/GroupPresenter.php b/Web/Presenters/GroupPresenter.php index 7a0f95ba..aafa2882 100644 --- a/Web/Presenters/GroupPresenter.php +++ b/Web/Presenters/GroupPresenter.php @@ -271,23 +271,23 @@ final class GroupPresenter extends OpenVKPresenter } } - function renderChangeOwner(int $id, int $newOwnerID): void + function renderChangeOwner(int $id, int $newOwnerId): void { $this->assertUserLoggedIn(); $this->willExecuteWriteAction(); if($_SERVER['REQUEST_METHOD'] !== "POST") - $this->redirect("/groups".$this->user->id); + $this->redirect("/groups" . $this->user->id); if(!Authenticator::verifyHash($this->postParam("password"), $this->user->identity->getChandlerUser()->getRaw()->passwordHash)) $this->flashFail("err", tr("error"), tr("incorrect_password")); $club = $this->clubs->get($id); - $newOwner = (new Users)->get($newOwnerID); + $newOwner = (new Users)->get($newOwnerId); if($this->user->id !== $club->getOwner()->getId()) $this->flashFail("err", tr("error"), tr("forbidden")); - $club->setOwner($newOwnerID); + $club->setOwner($newOwnerId); $club->addManager($this->user->id); $club->save();