diff --git a/libraries/BBcodeDefinitions/User.php b/libraries/BBcodeDefinitions/User.php index 68a2862..d731b4f 100644 --- a/libraries/BBcodeDefinitions/User.php +++ b/libraries/BBcodeDefinitions/User.php @@ -10,7 +10,7 @@ namespace Sakura\BBcodeDefinitions; use JBBCode\CodeDefinition; use JBBCode\ElementNode; use Sakura\Router; -use Sakura\User; +use Sakura\User as SakuraUser; use Sakura\Utils; /** @@ -47,7 +47,7 @@ class User extends CodeDefinition $content .= Utils::cleanString($child->getAsText(), true); } - $user = User::construct($content); + $user = SakuraUser::construct($content); $profile = Router::route('user.profile', $user->id); return "colour}; diff --git a/libraries/Controllers/ForumController.php b/libraries/Controllers/ForumController.php index 0f6a054..f4d939b 100644 --- a/libraries/Controllers/ForumController.php +++ b/libraries/Controllers/ForumController.php @@ -106,7 +106,9 @@ class ForumController extends Controller ->orderByRaw('COUNT(*) DESC') ->limit(1) ->get(['poster_id']); - $activePoster = User::construct($activePosterId[0]->poster_id); + $activePoster = User::construct( + $activePosterId ? $activePosterId[0]->poster_id : 0 + ); // Create the forum object $forum = new Forum; diff --git a/libraries/User.php b/libraries/User.php index 179129f..1a6fc09 100644 --- a/libraries/User.php +++ b/libraries/User.php @@ -1084,8 +1084,8 @@ class User ->insert([ 'change_time' => time(), 'user_id' => $this->id, - 'username_new_clean' => $username, - 'new_clean' => $username_clean, + 'username_new' => $username, + 'username_new_clean' => $username_clean, 'username_old' => $this->username, 'username_old_clean' => $this->usernameClean, ]); diff --git a/templates/yuuno/forum/index.twig b/templates/yuuno/forum/index.twig index 6fb733a..41fa3e8 100644 --- a/templates/yuuno/forum/index.twig +++ b/templates/yuuno/forum/index.twig @@ -45,15 +45,19 @@
Today's most active poster
-
-
-
-
- + + {% else %} +

No one yet!

+ {% endif %}