Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14646193
D20342.id48549.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D20342.id48549.diff
View Options
diff --git a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php
--- a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php
+++ b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php
@@ -175,6 +175,12 @@
return null;
}
+ // Don't show calendar information for disabled users, since it's probably
+ // not useful or accurate and may be misleading.
+ if ($user->getIsDisabled()) {
+ return null;
+ }
+
$midnight = PhabricatorTime::getTodayMidnightDateTime($viewer);
$week_end = clone $midnight;
$week_end = $week_end->modify('+3 days');
diff --git a/src/applications/people/customfield/PhabricatorUserStatusField.php b/src/applications/people/customfield/PhabricatorUserStatusField.php
--- a/src/applications/people/customfield/PhabricatorUserStatusField.php
+++ b/src/applications/people/customfield/PhabricatorUserStatusField.php
@@ -30,6 +30,12 @@
$user = $this->getObject();
$viewer = $this->requireViewer();
+ // Don't show availability for disabled users, since this is vaguely
+ // misleading to say "Availability: Available" and probably not useful.
+ if ($user->getIsDisabled()) {
+ return null;
+ }
+
return id(new PHUIUserAvailabilityView())
->setViewer($viewer)
->setAvailableUser($user);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 10:50 AM (20 h, 10 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6986879
Default Alt Text
D20342.id48549.diff (1 KB)
Attached To
Mode
D20342: Hide "Availability" and "Calendar" on user profiles for disabled users
Attached
Detach File
Event Timeline
Log In to Comment