User/Misc

* floating changes
 * codify user checks into functions
This commit is contained in:
Sarjuuk
2025-04-02 22:27:05 +02:00
parent 3078763ec3
commit 682b315e17
22 changed files with 78 additions and 71 deletions

View File

@@ -29,7 +29,7 @@ class GuidesPage extends GenericPage
if ($pageCall == 'my-guides')
{
if (!User::$id)
if (!User::isLoggedIn())
$this->error();
$this->name = Util::ucFirst(Lang::guide('myGuides'));
@@ -81,7 +81,7 @@ class GuidesPage extends GenericPage
$this->lvTabs[] = [GuideList::$brickFile, $tabData];
$this->redButtons = [BUTTON_GUIDE_NEW => User::$id && User::canComment()];
$this->redButtons = [BUTTON_GUIDE_NEW => User::canWriteGuide()];
}
protected function generateTitle()