Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix API user registration role #188

Merged
merged 1 commit into from
Jan 28, 2025
Merged

Fix API user registration role #188

merged 1 commit into from
Jan 28, 2025

Conversation

bobbyiliev
Copy link
Collaborator

Removing the role_id causing the bug as reported in #184

The default role is assigned already thanks to:

wave/app/Models/User.php

Lines 62 to 69 in a96ac49

// Listen for the created event of the model
static::created(function ($user) {
// Remove all roles
$user->syncRoles([]);
// Assign the default role
$user->assignRole( config('wave.default_user_role', 'registered') );
});
}

@bobbyiliev bobbyiliev merged commit c4fcbff into main Jan 28, 2025
2 checks passed
@bobbyiliev bobbyiliev deleted the fix-api-register-role branch January 28, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant