Visman 4 years ago
parent
commit
7b31231c4a
3 changed files with 7 additions and 6 deletions
  1. 5 4
      app/Models/User/Save.php
  2. 1 1
      app/bootstrap.php
  3. 1 1
      readme.md

+ 5 - 4
app/Models/User/Save.php

@@ -79,10 +79,7 @@ class Save extends Action
         $this->c->DB->exec($query, $vars);
         $user->resModified();
 
-        if (
-            $nameChange
-            && ! $user->isGuest
-        ) {
+        if ($nameChange) {
             $this->updateUsernameInOtherTables($user);
         }
 
@@ -145,6 +142,10 @@ class Save extends Action
      */
     protected function updateUsernameInOtherTables(User $user): void
     {
+        if ($user->isGuest) {
+            return;
+        }
+
         $this->c->posts->updateUsername($user);
         $this->c->topics->updateUsername($user);
         $this->c->forums->updateUsername($user);

+ 1 - 1
app/bootstrap.php

@@ -44,7 +44,7 @@ if (
 }
 $c->PUBLIC_URL = $c->BASE_URL . $forkPublicPrefix;
 
-$c->FORK_REVISION = 24;
+$c->FORK_REVISION = 25;
 $c->START         = $forkStart;
 $c->DIR_APP       = __DIR__;
 $c->DIR_PUBLIC    = $forkPublic;

+ 1 - 1
readme.md

@@ -1,4 +1,4 @@
-# ForkBB rev.24 Pre-Alpha Readme
+# ForkBB rev.25 Pre-Alpha Readme
 
 ## About