fix: user hidden being overridden by base model

This commit is contained in:
Roardom
2023-08-25 09:13:57 +00:00
parent 2ca7adbbe5
commit 69d4ecdecb

View File

@@ -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;
}