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

Stop updating name properties if all are already set #14771

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

brandonkelly
Copy link
Member

Description

  • NameTrait::prepareNamesForSave() no longer makes any changes if fullName and firstName/lastName are already set on the model.
  • User::setAttributes(), Address::setAttributes(), and UsersController::populateNameAttributes() now unset firstName and lastName if fullName was posted (in addition to already unsetting fullName if firstName/lastName were posted).

With those changes, it’s now possible to load up a user/address and resave them programmatically without affecting the name properties.

Related issues

@brandonkelly brandonkelly requested a review from i-just April 8, 2024 17:17
@brandonkelly brandonkelly merged commit b5bfbd8 into 4.9 Apr 9, 2024
8 checks passed
@brandonkelly brandonkelly deleted the feature/name-tweaks branch April 9, 2024 21:47
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