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) New users not receiving default stylesheet defined in config #4078

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

Roardom
Copy link
Collaborator

@Roardom Roardom commented Aug 23, 2024

No description provided.

@HDVinnie
Copy link
Collaborator

@Roardom I think when user_settings was refactored to its own table we missed some. Instead of these null coalescing operators should we just set user settings in action.

'style' => config('other.default_style', 0),
'locale' => config('app.locale'),

@Roardom
Copy link
Collaborator Author

Roardom commented Aug 24, 2024

I was trying to implement it in a way where a sysop could change the default style to e.g. Halloween during October and can reset it back afterwards, unless the user chose their own stylesheet which would then override the default. Creating the settings object on user creation wouldn't allow that.

However, I should probably add the same thing to locale and remove those attributes from the user create method. There's a rule in larastan to detect when properties are passed to the create method that aren't actually properties. Might be worth adding it.

@HDVinnie HDVinnie merged commit 4fa470e into HDInnovations:8.x.x Aug 28, 2024
5 checks passed
@HDVinnie HDVinnie deleted the fix-default-styles branch August 28, 2024 12:24
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.

2 participants