mirror of
https://github.com/snipe/snipe-it.git
synced 2026-03-01 22:10:25 +00:00
Use auth()->id() instead of Auth::id()
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
@ -101,7 +101,7 @@ class BulkUsersController extends Controller
|
||||
$user_raw_array = $request->input('ids');
|
||||
|
||||
// Remove the user from any updates.
|
||||
$user_raw_array = array_diff($user_raw_array, [Auth::id()]);
|
||||
$user_raw_array = array_diff($user_raw_array, [auth()->id()]);
|
||||
$manager_conflict = false;
|
||||
$users = User::whereIn('id', $user_raw_array)->where('id', '!=', auth()->id())->get();
|
||||
|
||||
@ -166,7 +166,7 @@ class BulkUsersController extends Controller
|
||||
}
|
||||
// Save the updated info
|
||||
User::whereIn('id', $user_raw_array)
|
||||
->where('id', '!=', Auth::id())->update($this->update_array);
|
||||
->where('id', '!=', auth()->id())->update($this->update_array);
|
||||
|
||||
if (array_key_exists('location_id', $this->update_array)){
|
||||
Asset::where('assigned_type', User::class)
|
||||
@ -228,7 +228,7 @@ class BulkUsersController extends Controller
|
||||
|
||||
$user_raw_array = request('ids');
|
||||
|
||||
if (($key = array_search(Auth::id(), $user_raw_array)) !== false) {
|
||||
if (($key = array_search(auth()->id(), $user_raw_array)) !== false) {
|
||||
unset($user_raw_array[$key]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user