Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2933385
D25477.1737765344.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25477.1737765344.diff
View Options
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(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 25, 00:35 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1148048
Default Alt Text
D25477.1737765344.diff (1 KB)
Attached To
Mode
D25477: Visually indicate new user accounts
Attached
Detach File
Event Timeline
Log In to Comment