Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/storage/PhabricatorUser.php
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | final class PhabricatorUser | ||||
public function getIsStandardUser() { | public function getIsStandardUser() { | ||||
$type_user = PhabricatorPeopleUserPHIDType::TYPECONST; | $type_user = PhabricatorPeopleUserPHIDType::TYPECONST; | ||||
return $this->getPHID() && (phid_get_type($this->getPHID()) == $type_user); | return $this->getPHID() && (phid_get_type($this->getPHID()) == $type_user); | ||||
} | } | ||||
public function getConfiguration() { | public function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_COLUMN_SCHEMA => array( | |||||
'userName' => 'text64', | |||||
'realName' => 'text128', | |||||
'sex' => 'text4?', | |||||
'translation' => 'text64?', | |||||
'passwordSalt' => 'text32?', | |||||
'passwordHash' => 'text128?', | |||||
'profileImagePHID' => 'phid?', | |||||
'consoleEnabled' => 'bool', | |||||
'consoleVisible' => 'bool', | |||||
'consoleTab' => 'text64', | |||||
'conduitCertificate' => 'text255', | |||||
'isSystemAgent' => 'bool', | |||||
'isDisabled' => 'bool', | |||||
'isAdmin' => 'bool', | |||||
'timezoneIdentifier' => 'text255', | |||||
'isEmailVerified' => 'uint32', | |||||
'isApproved' => 'uint32', | |||||
'accountSecret' => 'bytes64', | |||||
'isEnrolledInMultiFactor' => 'bool', | |||||
), | |||||
self::CONFIG_KEY_SCHEMA => array( | |||||
'key_phid' => null, | |||||
'phid' => array( | |||||
'columns' => array('phid'), | |||||
'unique' => true, | |||||
), | |||||
'userName' => array( | |||||
'columns' => array('userName'), | |||||
'unique' => true, | |||||
), | |||||
'realName' => array( | |||||
'columns' => array('realName'), | |||||
), | |||||
'key_approved' => array( | |||||
'columns' => array('isApproved'), | |||||
), | |||||
), | |||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
public function generatePHID() { | public function generatePHID() { | ||||
return PhabricatorPHID::generateNewPHID( | return PhabricatorPHID::generateNewPHID( | ||||
PhabricatorPeopleUserPHIDType::TYPECONST); | PhabricatorPeopleUserPHIDType::TYPECONST); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 769 Lines • Show Last 20 Lines |