浏览代码

Minor update Models\Rules\Profile

Visman 4 年之前
父节点
当前提交
cb6bc89627
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      app/Models/Rules/Profile.php

+ 5 - 1
app/Models/Rules/Profile.php

@@ -105,10 +105,14 @@ class Profile extends Rules
     protected function getsendPM(): bool
     {
         return $this->user->usePM
+            && 1 === $this->user->u_pm
             && ! $this->my
             && (
                 $this->user->isAdmin
-                || $this->curUser->usePM
+                || (
+                    $this->curUser->usePM
+                    && 1 === $this->curUser->u_pm
+                )
             );
     }