Comment clarification on #7186

This commit is contained in:
snipe 2019-07-15 15:31:09 -07:00
parent 8c73a47afb
commit b4b6d6b571

View file

@ -269,7 +269,7 @@ class UsersController extends Controller
// Check if the request has groups passed and has a value // Check if the request has groups passed and has a value
if ($request->filled('groups')) { if ($request->filled('groups')) {
$user->groups()->sync($request->input('groups')); $user->groups()->sync($request->input('groups'));
// The groups value has been passed but it is null, so we should blank it out // The groups field has been passed but it is null, so we should blank it out
} elseif ($request->has('groups')) { } elseif ($request->has('groups')) {
$user->groups()->sync(array()); $user->groups()->sync(array());
} }