X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/bce5fdd5cd82d274b4f944938a8080c1d75e4ce0..refs/pull/665/head:/app/User.php diff --git a/app/User.php b/app/User.php index 3d77cd8ee..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', 'display']; //to write in user database + 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); } /**