From 989ded8868966675f515567a040451be9f67aba4 Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 31 Oct 2021 21:46:34 -0400 Subject: [PATCH] Revert "Update Activation Dependencies" This reverts commit 45c36bdc7d1844eeb83a8ba070da8ea68acb7f68. --- globals/config.php | 6 ++---- globals/userauth.php | 5 ++--- html/activate.php | 7 +++---- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/globals/config.php b/globals/config.php index 8ce304d..cb71217 100644 --- a/globals/config.php +++ b/globals/config.php @@ -8,8 +8,6 @@ Fuck you too Austin :) */ -use Alphaland\Users\Activation; - try { //php config @@ -128,8 +126,8 @@ try forceHttpsCloudflare(); } - // TODO: WebContextManager::CurrentUser instead of $GLOBALS['user']!! - $activated = Activation::IsUserActivated($GLOBALS['user']->id); + $activated = new Alphaland\Users\Activation(); + $activated = $activated->isUserActivated($GLOBALS['user']->id); $maintenance = checkIfUnderMaintenance(); $banned = checkIfBanned($GLOBALS['user']->id); diff --git a/globals/userauth.php b/globals/userauth.php index 9c352bf..7552668 100644 --- a/globals/userauth.php +++ b/globals/userauth.php @@ -5,8 +5,6 @@ User class */ -use Alphaland\Users\Activation; - class user { public $id = -1; public $name = ""; @@ -67,7 +65,8 @@ class user { // .. //activation stuff - $activated = Activation::IsUserActivated($this->id); + $activated = new Alphaland\Users\Activation(); + $activated = $activated->isUserActivated($this->id); if (!banned($this->id)) { diff --git a/html/activate.php b/html/activate.php index e1450b8..62ff85a 100644 --- a/html/activate.php +++ b/html/activate.php @@ -1,12 +1,11 @@ id)) { +if ($activation->isUserActivated($user->id)) { redirect("/"); } -$activationcode = Activation::GetUserActivationCode($user->id); +$activationcode = $activation->getUserActivationCode($user->id); $body = '