Page MenuHomePhorge

D25477.1737811307.diff
No OneTemporary

D25477.1737811307.diff

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
+ $user_account_age = time() - $user->getDateCreated();
+ $user_is_new = $user_account_age < (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 || $user_is_new) {
+ $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(

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 25, 13:21 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1135489
Default Alt Text
D25477.1737811307.diff (1 KB)

Event Timeline