diff --git a/src/applications/phid/PhabricatorObjectHandle.php b/src/applications/phid/PhabricatorObjectHandle.php --- a/src/applications/phid/PhabricatorObjectHandle.php +++ b/src/applications/phid/PhabricatorObjectHandle.php @@ -338,6 +338,37 @@ } $circle = null; + + // Show a small star on new user accounts - https://we.phorge.it/T15675 + if ($this->getType() == PhabricatorPeopleUserPHIDType::TYPECONST) { + $user = id(new PhabricatorPeopleQuery()) + ->setViewer(PhabricatorUser::getOmnipotentUser()) + ->withUsernames(array($name)) + ->executeOne(); + if ($user->canEstablishWebSessions()) { // exclude bots and mailing lists + $userAccountAge = time() - $user->getDateCreated(); + $userIsNew = $userAccountAge < (60 * 60 * 24 * 30); // 30 days + $query = id(new PhabricatorFeedQuery()) + ->setViewer(PhabricatorUser::getOmnipotentUser()) + ->withFilterPHIDs(array($this->getPHID())) + ->setLimit(6) + ->setReturnPartialResultsOnOverheat(true); + $stories = $query->execute(); + + if (count($stories) < 6 || $userIsNew) { + $circle = array( + phutil_tag( + 'span', + array( + 'class' => 'phui-person-new-user-account', + ), + "\xE2\x98\x86"), + ' ', + ); + } + } + } + if ($this->availability != self::AVAILABILITY_FULL) { $classes[] = 'handle-availability-'.$this->availability; $circle = array(