X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/7f902e41c7a6a18a754bb889c2655aa4fba736ec..refs/pull/665/head:/app/User.php diff --git a/app/User.php b/app/User.php index 703322cbd..fd6879ba0 100644 --- a/app/User.php +++ b/app/User.php @@ -22,7 +22,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon * The attributes that are mass assignable. * @var array */ - protected $fillable = ['name', 'email', 'image_id', 'books_display' ]; + protected $fillable = ['name', 'email', 'image_id']; /** * The attributes excluded from the model's JSON form. @@ -81,7 +81,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon */ public function hasSystemRole($role) { - return $this->roles->pluck('system_name')->contains('admin'); + return $this->roles->pluck('system_name')->contains($role); } /**