Page MenuHomePhabricator

Add config to require real name, respect config when creating new users, drop real name from full name if not provided.
ClosedPublic

Authored by lpriestley on May 9 2014, 5:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 10:29 PM
Unknown Object (File)
Sun, Apr 14, 1:13 AM
Unknown Object (File)
Sun, Apr 7, 4:53 PM
Unknown Object (File)
Mon, Apr 1, 1:10 PM
Unknown Object (File)
Sat, Mar 30, 1:36 AM
Unknown Object (File)
Mar 17 2024, 6:58 PM
Unknown Object (File)
Feb 16 2024, 7:03 AM
Unknown Object (File)
Feb 13 2024, 11:40 PM
Subscribers
Tokens
"Pterodactyl" token, awarded by epriestley.

Details

Summary

Fixes T4728, first pass, Make real name optional on user accounts

Test Plan

Default real name config should be false (not required). Create new user, real name should not be required. Toggle config, real name should be required. Users with no real name should be always listed by their usernames.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

lpriestley retitled this revision from to Add config to require real name, respect config when creating new users, drop real name from full name if not provided..
lpriestley updated this object.
lpriestley edited the test plan for this revision. (Show Details)
lpriestley added a reviewer: epriestley.
lpriestley edited edge metadata.

Switching double negative

epriestley edited edge metadata.

This looks great -- two small tweaks inline.

src/applications/people/config/PhabricatorUserConfigOptions.php
40–41

You can make this slightly more user friendly by giving the options better labels with setBoolOptions(), e.g.:

->setBoolOptions(
  array(
    pht('Make real names required'),
    pht('Make real names optional'),
  ))

This should make the dropdown have more explicit options, instead of "True" / "False".

src/applications/people/controller/PhabricatorPeopleProfileController.php
32–38

Here, I think we have an opportunity to simplify things by just calling:

->setHeader($user->getFullName())

...and in the two cases below. We could have done this before, but now that the logic is more complicated it's more worthwhile.

This revision now requires changes to proceed.May 10 2014, 2:21 AM
lpriestley edited edge metadata.

Addressing review

epriestley edited edge metadata.

Perfect, thanks!

This revision is now accepted and ready to land.May 12 2014, 4:51 PM
epriestley updated this revision to Diff 21561.

Closed by commit rPdfcccd4cb882 (authored by @lpriestley, committed by @epriestley).