Skip to content

refactor: Abstract user update validation into dedicated method#1

Open
xavierandueza wants to merge 1 commit into
masterfrom
refactor/abstract-user-update-logic-into-methods
Open

refactor: Abstract user update validation into dedicated method#1
xavierandueza wants to merge 1 commit into
masterfrom
refactor/abstract-user-update-logic-into-methods

Conversation

@xavierandueza
Copy link
Copy Markdown
Owner

@xavierandueza xavierandueza commented Feb 12, 2026

Summary

  • Extracts the inline field validation checks (email uniqueness, username immutability, slug uniqueness, role permissions) from update_item() into a new validate_user_update_fields() protected method
  • Improves readability of update_item() by reducing its size and separating concerns
  • Allows subclasses to override or extend the validation logic independently

Extract inline field validation checks from `update_item()` into a new
`validate_user_update_fields()` method in the users controller. This
improves readability and allows the validation logic to be reused or
overridden by subclasses.
@xavierandueza xavierandueza changed the title REST API: Abstract user update validation into dedicated method refactor: Abstract user update validation into dedicated method Feb 12, 2026
@xavierandueza xavierandueza marked this pull request as ready for review February 13, 2026 11:53
@xavierandueza xavierandueza reopened this Feb 13, 2026
@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Feb 13, 2026

📚 Documentation update workflow has been queued for reopened PR (Job ID: 698f10c8f1a4a952e409d5e9). The documentation bot will propose changes (if relevant) shortly.

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Feb 13, 2026

📚 Documentation update workflow has been queued for reopened PR (Job ID: 698f1226eedcb468ab9b0390). The documentation bot will propose changes (if relevant) shortly.

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Feb 13, 2026

📚 Documentation update workflow has been queued for reopened PR (Job ID: 698f127aeedcb468ab9b0394). The documentation bot will propose changes (if relevant) shortly.

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Feb 13, 2026

📊 PR Analysis Summary

Files Changed: 1 file(s)
Additions: +60 lines
Deletions: -34 lines

Changed Files
  • wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

Relevant Documentation Pages

Docs impacted by this PR
  • updateuser
  • updatecurrentuser
  • createuser
  • updatepost
  • updateapplicationpassword

✅ Documentation Changes Applied

🔗 View changes in ReadMe


This analysis was automatically generated by the ReadMe AI Documentation Bot.

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Feb 13, 2026

📚 Documentation update workflow has been queued for reopened PR (Job ID: 698f1ccdeedcb468ab9b03a8). The documentation bot will propose changes (if relevant) shortly.

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Feb 13, 2026

📊 PR Analysis Summary

Files Changed: 1 file(s)
Additions: +60 lines
Deletions: -34 lines

Changed Files
  • wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

Relevant Documentation Pages

Docs impacted by this PR
  • plugins-controller-classes
  • updateuser
  • updatecurrentuser
  • createuser
  • updatepost
  • updateapplicationpassword

✅ Documentation Changes Applied

🔗 View changes in ReadMe


This analysis was automatically generated by the ReadMe AI Documentation Bot.

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Feb 17, 2026

📚 Documentation update workflow has been queued for reopened PR (Job ID: 699414bb002572af86e8c1f9). The documentation bot will propose changes (if relevant) shortly.

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Feb 17, 2026

📊 PR Analysis Summary

Files Changed: 1 file(s)
Additions: +60 lines
Deletions: -34 lines

Changed Files
  • wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

Relevant Documentation Pages

Docs impacted by this PR
  • updateuser
  • updatecurrentuser
  • plugins-controller-classes
  • plugins-data-validation
  • plugins-rest-api-overview
  • listusers
  • createuser
  • plugins-schema
  • getuser
  • updateapplicationpassword

✅ Documentation Changes Applied

🔗 View changes in ReadMe


This analysis was automatically generated by the ReadMe AI Documentation Bot.

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Feb 17, 2026

📚 Documentation update workflow has been queued for reopened PR (Job ID: 6994ec21a0f3185b35c7676c). The documentation bot will propose changes (if relevant) shortly.

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Feb 17, 2026

📊 PR Analysis Summary

Files Changed: 1 file(s)
Additions: +60 lines
Deletions: -34 lines

Changed Files
  • wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

Relevant Documentation Pages

Docs impacted by this PR
  • updateuser
  • updatecurrentuser
  • createuser
  • listusers
  • updateapplicationpassword
  • plugins-data-validation
  • plugins-schema

ℹ️ Documentation Updates

No automatic documentation updates were applied.


This analysis was automatically generated by the ReadMe AI Documentation Bot.

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Feb 20, 2026

📚 No documentation updates were needed for this PR.

@xavierandueza xavierandueza reopened this Mar 26, 2026
@readme-agent-staging
Copy link
Copy Markdown

readme-agent-staging Bot commented Mar 26, 2026

📚 No documentation updates were needed for this PR.

1 similar comment
@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Mar 26, 2026

📚 No documentation updates were needed for this PR.

@readme-agent-staging
Copy link
Copy Markdown

readme-agent-staging Bot commented Mar 26, 2026

📚 No documentation updates were needed for this PR.

1 similar comment
@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Mar 26, 2026

📚 No documentation updates were needed for this PR.

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Apr 1, 2026

📚 No documentation changes were needed for this PR (Job ID: 69cda29f1f777de526a58206).

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Apr 8, 2026

📚 No documentation changes were needed for this PR (Job ID: 69d59dbc20f2bdc04a099fae).

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Apr 10, 2026

📚 No documentation changes were needed for this PR (Job ID: 69d84ac2b65c159267107562).

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Apr 24, 2026

📚 No documentation changes were needed for this PR (Job ID: 69eb00ed7e30b762e6da71f4).

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Apr 24, 2026

📚 No documentation changes were needed for this PR (Job ID: 69eb146654bc3310f58c476a).

@readme-pr-app
Copy link
Copy Markdown

readme-pr-app Bot commented Apr 24, 2026

📚 No documentation changes were needed for this PR (Job ID: 69eb15be54bc3310f58c4776).

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