Homec4science

Consolidate user editing code

Authored by epriestley <git@epriestley.com> on May 25 2012, 16:30.

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

Committed
epriestley <git@epriestley.com>May 25 2012, 16:30
Pushed
aubortJan 31 2017, 17:16
Parents
rPHeb310888e511: Warn user before losing his data
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH70fd96037bfd: Consolidate user editing code (authored by epriestley <git@epriestley.com>).May 25 2012, 16:30