瀏覽代碼

The title Guest should be displayed before the title Banned

Visman 2 年之前
父節點
當前提交
2e108b2edd
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/Models/User/User.php

+ 3 - 3
app/Models/User/User.php

@@ -215,14 +215,14 @@ class User extends DataModel
      */
     public function title(): string
     {
-        if ($this->isBanByName) {
+        if ($this->isGuest) {
+            return __('Guest');
+        } elseif ($this->isBanByName) {
             return __('Banned');
         } elseif ('' != $this->title) {
             return $this->censorTitle;
         } elseif ('' != $this->g_user_title) {
             return $this->censorG_user_title;
-        } elseif ($this->isGuest) {
-            return __('Guest');
         } elseif ($this->isUnverified) {
             return __('Unverified');
         } else {