Page MenuHomenazrin ltd
Diviner Tech Docs PhabricatorUser

final class PhabricatorUser
Phorge Technical Documentation (People)

This class is not documented.

Tasks

Availability

Profile Image Cache

No methods for this task.

Multi-Factor Authentication

Managing Handles

No methods for this task.

Settings

User Cache

Other Methods

handle

  • public function loadHandles($phids) — Get a @{class:PhabricatorHandleList} which benefits from this viewer's internal handle pool.
  • public function renderHandle($phid) — Get a @{class:PHUIHandleView} for a single handle.
  • public function renderHandleList($phids) — Get a @{class:PHUIHandleListView} for a list of handles.

Methods

public function getApplicationName()
Inherited

This method is not documented.
Return
wild

protected function readField($field)

This method is not documented.
Parameters
$field
Return
wild

public function isUserActivated()

Is this a live account which has passed required approvals? Returns true if this is an enabled, verified (if required), approved (if required) account, and false otherwise.

Return
boolTrue if this is a standard, usable account.

public function isResponsive()

Is this a user who we can reasonably expect to respond to requests?

This is used to provide a grey "disabled/unresponsive" dot cue when rendering handles and tags, so it isn't a surprise if you get ignored when you ask things of users who will not receive notifications or could not respond to them (because they are disabled, unapproved, do not have verified email addresses, etc).

Return
boolTrue if this user can receive and respond to requests from other humans.

public function canEstablishWebSessions()

This method is not documented.
Return
wild

public function canEstablishAPISessions()

This method is not documented.
Return
wild

public function canEstablishSSHSessions()

This method is not documented.
Return
wild

public function getIsStandardUser()

Returns true if this is a standard user who is logged in. Returns false for logged out, anonymous, or external users.

Return
bool`true` if the user is a standard user who is logged in with a normal session.

protected function getConfiguration()

This method is not documented.
Return
wild

public function generatePHID()

This method is not documented.
Return
wild

public function getMonogram()

This method is not documented.
Return
wild

public function isLoggedIn()

This method is not documented.
Return
wild

public function saveWithoutIndex()

This method is not documented.
Return
wild

public function save()

This method is not documented.
Return
wild

public function attachSession($session)

This method is not documented.
Parameters
PhabricatorAuthSession$session
Return
wild

public function getSession()

This method is not documented.
Return
wild

public function hasSession()

This method is not documented.
Return
wild

public function hasHighSecuritySession()

This method is not documented.
Return
wild

private function generateConduitCertificate()

This method is not documented.
Return
wild

private function cleanUpProfile()

This function removes the blurb from a profile. This is an incredibly broad hammer to handle some spam on the upstream, which will be refined later.

Return
void

public function getUserProfile()

This method is not documented.
Return
wild

public function attachUserProfile($profile)

This method is not documented.
Parameters
PhabricatorUserProfile$profile
Return
wild

public function loadUserProfile()

This method is not documented.
Return
wild

public function loadPrimaryEmailAddress()

This method is not documented.
Return
wild

public function loadPrimaryEmail()

This method is not documented.
Return
wild

public function getUserSetting($key)

This method is not documented.
Parameters
$key
Return
wild

public function compareUserSetting($key, $value)

Test if a given setting is set to a particular value.

Parameters
const$keySetting key.
wild$valueValue to compare.
Return
boolTrue if the setting has the specified value.

private function writeUserSettingCache($key, $value)

This method is not documented.
Parameters
$key
$value
Return
wild

public function getTranslation()

This method is not documented.
Return
wild

public function getTimezoneIdentifier()

This method is not documented.
Return
wild

public static function getGlobalSettingsCacheKey()

This method is not documented.
Return
wild

private function loadGlobalSettings()

This method is not documented.
Return
wild

public function overrideTimezoneIdentifier($identifier)

Override the user's timezone identifier.

This is primarily useful for unit tests.

Parameters
string$identifierNew timezone identifier.
Return
this

public function getGender()

This method is not documented.
Return
wild

public function updateNameTokens()

Populate the nametoken table, which used to fetch typeahead results. When a user types "linc", we want to match "Abraham Lincoln" from on-demand typeahead sources. To do this, we need a separate table of name fragments.

Return
wild

public static function describeValidUsername()

This method is not documented.
Return
wild

public static function validateUsername($username)

This method is not documented.
Parameters
$username
Return
wild

public static function getDefaultProfileImageURI()

This method is not documented.
Return
wild

public function getProfileImageURI()

This method is not documented.
Return
wild

public function getUnreadNotificationCount()

This method is not documented.
Return
wild

public function getUnreadMessageCount()

This method is not documented.
Return
wild

public function getRecentBadgeAwards()

This method is not documented.
Return
wild

public function getFullName()

This method is not documented.
Return
wild

public function getTimeZone()

This method is not documented.
Return
wild

public function getTimeZoneOffset()

This method is not documented.
Return
wild

public function getTimeZoneOffsetInHours()

This method is not documented.
Return
wild

public function formatShortDateTime($when, $now)

This method is not documented.
Parameters
$when
$now
Return
wild

public function __toString()

This method is not documented.
Return
wild

public static function loadOneWithEmailAddress($address)

This method is not documented.
Parameters
$address
Return
wild

public function getDefaultSpacePHID()

This method is not documented.
Return
wild

public function hasConduitClusterToken()

This method is not documented.
Return
wild

public function attachConduitClusterToken($token)

This method is not documented.
Parameters
PhabricatorConduitToken$token
Return
wild

public function getConduitClusterToken()

This method is not documented.
Return
wild

public function attachAvailability($availability)

This method is not documented.
Parameters
array$availability
Return
wild

public function getAwayUntil()

Get the timestamp the user is away until, if they are currently away.

Return
int|nullEpoch timestamp, or `null` if the user is not away.

public function getDisplayAvailability()

This method is not documented.
Return
wild

public function getAvailabilityEventPHID()

This method is not documented.
Return
wild

public function getAvailabilityCache()

Get cached availability, if present.

Return
wild|nullCache data, or null if no cache is available.

public function writeAvailabilityCache($availability, $ttl)

Write to the availability cache.

Parameters
wild$availabilityAvailability cache data.
int|null$ttlCache TTL.
Return
this

public function updateMultiFactorEnrollment()

Update the flag storing this user's enrollment in multi-factor auth.

With certain settings, we need to check if a user has MFA on every page, so we cache MFA enrollment on the user object for performance. Calling this method synchronizes the cache by examining enrollment records. After updating the cache, use getIsEnrolledInMultiFactor() to check if the user is enrolled.

This method should be called after any changes are made to a given user's multi-factor configuration.

Return
void

public function getIsEnrolledInMultiFactor()

Check if the user is enrolled in multi-factor authentication.

Enrolled users have one or more multi-factor authentication sources attached to their account. For performance, this value is cached. You can use updateMultiFactorEnrollment() to update the cache.

Return
boolTrue if the user is enrolled.

public function isOmnipotent()

Returns true if this user is omnipotent. Omnipotent users bypass all policy checks.

Return
boolTrue if the user bypasses policy checks.

public static function getOmnipotentUser()

Get an omnipotent user object for use in contexts where there is no acting user, notably daemons.

Return
PhabricatorUserAn omnipotent user.

public function getCacheFragment()

Get a scalar string identifying this user.

This is similar to using the PHID, but distinguishes between omnipotent and public users explicitly. This allows safe construction of cache keys or cache buckets which do not conflate public and omnipotent users.

Return
stringScalar identifier.

public function loadHandles($phids)

Get a PhabricatorHandleList which benefits from this viewer's internal handle pool.

Parameters
list<phid>$phidsList of PHIDs to load.
Return
PhabricatorHandleListHandle list object.

public function renderHandle($phid)

Get a PHUIHandleView for a single handle.

This benefits from the viewer's internal handle pool.

Parameters
phid$phidPHID to render a handle for.
Return
PHUIHandleViewView of the handle.

public function renderHandleList($phids)

Get a PHUIHandleListView for a list of handles.

This benefits from the viewer's internal handle pool.

Parameters
list<phid>$phidsList of PHIDs to render.
Return
PHUIHandleListViewView of the handles.

public function attachBadgePHIDs($phids)

This method is not documented.
Parameters
array$phids
Return
wild

public function getBadgePHIDs()

This method is not documented.
Return
wild

public function getCSRFToken()

This method is not documented.
Return
wild

public function validateCSRFToken($token)

This method is not documented.
Parameters
$token
Return
wild

public function getAlternateCSRFString()

This method is not documented.
Return
wild

public function attachAlternateCSRFString($string)

This method is not documented.
Parameters
$string
Return
wild

private function newCSRFEngine()

This method is not documented.
Return
wild

public function getCapabilities()

This method is not documented.
Return
wild

public function getPolicy($capability)

This method is not documented.
Parameters
$capability
Return
wild

public function hasAutomaticCapability($capability, $viewer)

This method is not documented.
Parameters
$capability
PhabricatorUser$viewer
Return
wild

public function describeAutomaticCapability($capability)

This method is not documented.
Parameters
$capability
Return
wild

public function getCustomFieldSpecificationForRole($role)

This method is not documented.
Parameters
$role
Return
wild

public function getCustomFieldBaseClass()

This method is not documented.
Return
wild

public function getCustomFields()

This method is not documented.
Return
wild

public function attachCustomFields($fields)

This method is not documented.
Parameters
PhabricatorCustomFieldAttachment$fields
Return
wild

public function destroyObjectPermanently($engine)

This method is not documented.
Parameters
PhabricatorDestructionEngine$engine
Return
wild

public function getSSHPublicKeyManagementURI($viewer)

This method is not documented.
Parameters
PhabricatorUser$viewer
Return
wild

public function getSSHKeyDefaultName()

This method is not documented.
Return
wild

public function getSSHKeyNotifyPHIDs()

This method is not documented.
Return
wild
This method is not documented.
Return
wild
This method is not documented.
Return
wild

public function newFulltextEngine()

This method is not documented.
Return
wild

public function newFerretEngine()

This method is not documented.
Return
wild
This method is not documented.
Return
wild

public function getFieldValuesForConduit()

This method is not documented.
Return
wild

public function getConduitSearchAttachments()

This method is not documented.
Return
wild

public function attachRawCacheData($data)

This method is not documented.
Parameters
array$data
Return
wild

public function setAllowInlineCacheGeneration($allow_cache_generation)

This method is not documented.
Parameters
$allow_cache_generation
Return
wild

protected function requireCacheData($key)

This method is not documented.
Parameters
$key
Return
wild

public function clearCacheData($key)

This method is not documented.
Parameters
$key
Return
wild

public function getCSSValue($variable_key)

This method is not documented.
Parameters
$variable_key
Return
wild

public function newPasswordDigest($envelope, $password)

This method is not documented.
Parameters
PhutilOpaqueEnvelope$envelope
PhabricatorAuthPassword$password
Return
wild

public function newPasswordBlocklist($viewer, $engine)

This method is not documented.
Parameters
PhabricatorUser$viewer
PhabricatorAuthPasswordEngine$engine
Return
wild