Skip to content

Commit

Permalink
Filter out deleted roles.
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Nov 6, 2024
1 parent 44ea6dc commit 4f53b28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Auth/Eloquent/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function explicitRoles($roles = null)
return $this->roles = $this->roles
?? (new Roles($this))->all()->map(function ($row) {
return Role::find($row->role_id);
})->keyBy->handle();
})->filter()->keyBy->handle();
}

protected function saveRoles()
Expand Down

0 comments on commit 4f53b28

Please sign in to comment.