diff --git a/app/Models/User.php b/app/Models/User.php index 776e2b57a..935b8f0a4 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -54,6 +54,7 @@ class User extends Authenticatable protected $casts = [ 'last_login' => 'datetime', 'last_action' => 'datetime', + 'hidden' => 'boolean', 'can_comment' => 'boolean', 'can_download' => 'boolean', 'can_request' => 'boolean', @@ -673,7 +674,7 @@ class User extends Authenticatable return true; } - if ($target->hidden == 1) { + if ($target->getAttribute('hidden')) { return false; }