浏览代码

Minor update Rules\Profile

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

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

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