Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / people / config / PhabricatorUserConfigOptions.php
blob3ef736c8cae45cdf955f23964fa6efdeb4883582
1 <?php
3 final class PhabricatorUserConfigOptions
4 extends PhabricatorApplicationConfigOptions {
6 public function getName() {
7 return pht('User Profiles');
10 public function getDescription() {
11 return pht('User profiles configuration.');
14 public function getIcon() {
15 return 'fa-users';
18 public function getGroup() {
19 return 'apps';
22 public function getOptions() {
24 $default = array(
25 id(new PhabricatorUserRealNameField())->getFieldKey() => true,
26 id(new PhabricatorUserTitleField())->getFieldKey() => true,
27 id(new PhabricatorUserIconField())->getFieldKey() => true,
28 id(new PhabricatorUserSinceField())->getFieldKey() => true,
29 id(new PhabricatorUserRolesField())->getFieldKey() => true,
30 id(new PhabricatorUserStatusField())->getFieldKey() => true,
31 id(new PhabricatorUserBlurbField())->getFieldKey() => true,
34 foreach ($default as $key => $enabled) {
35 $default[$key] = array(
36 'disabled' => !$enabled,
40 $custom_field_type = 'custom:PhabricatorCustomFieldConfigOptionType';
42 return array(
43 $this->newOption('user.fields', $custom_field_type, $default)
44 ->setCustomData(id(new PhabricatorUser())->getCustomFieldBaseClass())
45 ->setDescription(pht('Select and reorder user profile fields.')),
46 $this->newOption('user.custom-field-definitions', 'wild', array())
47 ->setDescription(pht('Add new simple fields to user profiles.')),
48 $this->newOption('user.require-real-name', 'bool', true)
49 ->setDescription(pht('Always require real name for user profiles.'))
50 ->setBoolOptions(
51 array(
52 pht('Make real names required'),
53 pht('Make real names optional'),
54 )),