Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/search/PhabricatorUserSearchIndexer.php
| Show All 11 Lines | protected function buildAbstractDocumentByPHID($phid) { | ||||
| $doc = new PhabricatorSearchAbstractDocument(); | $doc = new PhabricatorSearchAbstractDocument(); | ||||
| $doc->setPHID($user->getPHID()); | $doc->setPHID($user->getPHID()); | ||||
| $doc->setDocumentType(PhabricatorPeoplePHIDTypeUser::TYPECONST); | $doc->setDocumentType(PhabricatorPeoplePHIDTypeUser::TYPECONST); | ||||
| $doc->setDocumentTitle($user->getUserName().' ('.$user->getRealName().')'); | $doc->setDocumentTitle($user->getUserName().' ('.$user->getRealName().')'); | ||||
| $doc->setDocumentCreated($user->getDateCreated()); | $doc->setDocumentCreated($user->getDateCreated()); | ||||
| $doc->setDocumentModified($user->getDateModified()); | $doc->setDocumentModified($user->getDateModified()); | ||||
| // TODO: Index the blurbs from their profile or something? Probably not | |||||
| // actually useful... | |||||
| $doc->addRelationship( | $doc->addRelationship( | ||||
| $user->isUserActivated() | $user->isUserActivated() | ||||
| ? PhabricatorSearchRelationship::RELATIONSHIP_OPEN | ? PhabricatorSearchRelationship::RELATIONSHIP_OPEN | ||||
| : PhabricatorSearchRelationship::RELATIONSHIP_CLOSED, | : PhabricatorSearchRelationship::RELATIONSHIP_CLOSED, | ||||
| $user->getPHID(), | $user->getPHID(), | ||||
| PhabricatorPeoplePHIDTypeUser::TYPECONST, | PhabricatorPeoplePHIDTypeUser::TYPECONST, | ||||
| time()); | time()); | ||||
| $this->indexCustomFields($doc, $user); | |||||
| return $doc; | return $doc; | ||||
| } | } | ||||
| } | } | ||||