Skip to content

Fixed user_settings not saving user settings correctly, and updated user_custom_field_definitions to save correctly - #437

Merged
ddon merged 4 commits into
BeamLabEU:devfrom
alexdont:dev
Mar 20, 2026
Merged

Fixed user_settings not saving user settings correctly, and updated user_custom_field_definitions to save correctly#437
ddon merged 4 commits into
BeamLabEU:devfrom
alexdont:dev

Conversation

@alexdont

Copy link
Copy Markdown
Contributor

No description provided.

Alexander Don and others added 4 commits March 20, 2026 11:16
…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
ddon merged commit 9dac480 into BeamLabEU:dev Mar 20, 2026
6 checks passed
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>
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