diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php index c9d3ef52ff..1a61259dab 100644 --- a/app/Repositories/User/UserRepository.php +++ b/app/Repositories/User/UserRepository.php @@ -58,7 +58,7 @@ class UserRepository implements UserRepositoryInterface } try { - $user->roles()->attach($role); + $user->roles()->attach($roleObject); } catch (QueryException $e) { // don't care Log::info(sprintf('Query exception when giving user a role: %s', $e->getMessage()));