HomePhorge

Consolidate user editing code

Description

Consolidate user editing code

Summary:

  • We currently have some bugs in account creation due to nontransactional user/email editing.
    • We save $user, then try to save $email. This may fail for various reasons, commonly because the email isn't unique.
    • This leaves us with a $user with no email.
  • Also, logging of edits is somewhat inconsistent across various edit mechanisms.
  • Move all editing to a PhabricatorUserEditor class.
  • Handle some broken-data cases more gracefully.

Test Plan:

  • Created and edited a user with accountadmin.
  • Created a user with add_user.php
  • Created and edited a user with People editor.
  • Created a user with OAuth.
  • Edited user information via Settings.
  • Tried to create an OAuth user with a duplicate email address, got a proper error.
  • Tried to create a user via People with a duplicate email address, got a proper error.

Reviewers: btrahan, vrana, jungejason

Reviewed By: btrahan

CC: tberman, aran

Maniphest Tasks: T1184

Differential Revision: https://secure.phabricator.com/D2569

Details

Provenance
epriestleyAuthored on May 25 2012, 7:30 AM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rPeb310888e511: Warn user before losing his data
Branches
Unknown
Tags
Unknown

Event Timeline