Fixed user_settings not saving user settings correctly, and updated user_custom_field_definitions to save correctly - #437
Merged
Merged
Conversation
…ings Move avatar upload detection into validate_profile handler where it actually fires, and remove the dead validate handler that was never reached. Fix update_profile to merge form custom_fields on top of all existing fields instead of only preserving avatar_file_uuid. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When update_user_custom_fields/2 writes keys that have no corresponding field definition, automatically create definitions so the data is visible in admin and user settings UIs. New fields default to enabled, admin-only (user_accessible: false), type "text", with label derived from the key. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of defaulting all auto-registered fields to "text", inspect the actual value to infer the correct type: boolean for booleans, number for numbers, url/email for matching strings, text for everything else. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ddon
added a commit
that referenced
this pull request
Mar 20, 2026
… UUID regex, add error logging Move ensure_definitions_exist/1 and infer_field_type/1 from Auth to CustomFields where they belong. Extract shared @uuid_regex module attribute. Add Logger.warning for failed auto-registrations. Extract merge_custom_fields_for_save/3 helper in UserSettings. Add PR #437 review docs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.