mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Check that the user was not aready deleted
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
d4c080c7e4
commit
5cdb2b7163
|
@ -341,8 +341,7 @@ class UsersController extends Controller
|
|||
$user = User::with('assets', 'assets.model', 'consumables', 'accessories', 'licenses', 'userloc');
|
||||
$user = Company::scopeCompanyables($user)->find($id);
|
||||
|
||||
|
||||
if ($user) {
|
||||
if (($user) && ($user->deleted_at = '')) {
|
||||
// Delete the user
|
||||
$user->delete();
|
||||
return redirect()->route('users.index')->with('success', trans('admin/users/message.success.delete'));
|
||||
|
|
Loading…
Reference in a new issue