Page MenuHomePhabricator
Authored By
Aklapper
Sep 11 2023, 2:00 PM
Size
1 KB
Referenced Files
None
Subscribers
None
diff --git a/src/applications/phid/PhabricatorObjectHandle.php b/src/applications/phid/PhabricatorObjectHandle.php
index 577fd05692..f34bd317d5 100644
--- a/src/applications/phid/PhabricatorObjectHandle.php
+++ b/src/applications/phid/PhabricatorObjectHandle.php
@@ -338,6 +338,33 @@ final class PhabricatorObjectHandle
}
$circle = null;
+
+ ## WMF https://phabricator.wikimedia.org/T64324 start - Indicate new users
+ $userAccountAge = time() - $userCreated;
+ $userIsNew = $userAccountAge < (60*60*24*30); // 30 days
+
+ if ($this->getType() == PhabricatorPeopleUserPHIDType::TYPECONST) {
+ $query = id(new PhabricatorFeedQuery())
+ ->setViewer(PhabricatorUser::getOmnipotentUser())
+ ->withFilterPHIDs(array($this->getPHID()))
+ ->setLimit(11)
+ ->setReturnPartialResultsOnOverheat(true);
+ $stories = $query->execute();
+
+ if (count($stories) < 11 || $userIsNew) {
+ $circle = array(
+ phutil_tag(
+ 'span',
+ array(
+ 'class' => 'newcomer-star-but-irrelevant-as-no-css-defined',
+ ),
+ "\xE2\x98\x86"),
+ ' ',
+ );
+ }
+ }
+ ## WMF https://phabricator.wikimedia.org/T64324 end - Indicate new users
+
if ($this->availability != self::AVAILABILITY_FULL) {
$classes[] = 'handle-availability-'.$this->availability;
$circle = array(

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
11369698
Default Alt Text
T64324 (1 KB)

Event Timeline