OctopyID / LaraPersonate

Login as a different user quickly for Laravel
MIT License
295 stars 27 forks source link

Soft-deleted users are still on the list #14

Closed NikarashiHatsu closed 1 year ago

NikarashiHatsu commented 1 year ago

The title somehow explains the whole bug, but just in case you want to reproduce it, try:

  1. Add soft deletes column to users table.
  2. Add a user, and delete it via system so the deleted_at column will be filled.
  3. Re-check the account personate component, the soft-deleted user is still exists on the list.
SupianIDz commented 1 year ago

Please upgrade to version v3.0.3, and delete the config/impersonate.php file then re-publish to get the latest configuration, there you can specify to show or hide deleted data using the softdelete method.

artisan vendor:publish --provider="Octopy\Impersonate\ImpersonateServiceProvider"

or you can add a line like this in your config

https://github.com/OctopyID/LaraPersonate/blob/5a708a85c1d79227a1da663ae8a0a9a04f29730a/config/impersonate.php#L38-L46