mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
Merge pull request #13311 from snipe/fixes/deleted_users_showing_in_current_users
Fixed: deleted users showing in current users
This commit is contained in:
commit
15bb943210
|
@ -78,12 +78,6 @@ class UsersController extends Controller
|
||||||
$users = Company::scopeCompanyables($users);
|
$users = Company::scopeCompanyables($users);
|
||||||
|
|
||||||
|
|
||||||
if (($request->filled('deleted')) && ($request->input('deleted') == 'true')) {
|
|
||||||
$users = $users->onlyTrashed();
|
|
||||||
} elseif (($request->filled('all')) && ($request->input('all') == 'true')) {
|
|
||||||
$users = $users->withTrashed();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request->filled('activated')) {
|
if ($request->filled('activated')) {
|
||||||
$users = $users->where('users.activated', '=', $request->input('activated'));
|
$users = $users->where('users.activated', '=', $request->input('activated'));
|
||||||
}
|
}
|
||||||
|
@ -272,6 +266,12 @@ class UsersController extends Controller
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (($request->filled('deleted')) && ($request->input('deleted') == 'true')) {
|
||||||
|
$users = $users->onlyTrashed();
|
||||||
|
} elseif (($request->filled('all')) && ($request->input('all') == 'true')) {
|
||||||
|
$users = $users->withTrashed();
|
||||||
|
}
|
||||||
|
|
||||||
$total = $users->count();
|
$total = $users->count();
|
||||||
$users = $users->skip($offset)->take($limit)->get();
|
$users = $users->skip($offset)->take($limit)->get();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue