@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Hide the blurb of a user when that user is disabled

Summary: T15074

Test Plan: Disabled a user, then made sure their blurb disappeared.

Reviewers: O1 Blessed Committers, avivey, speck

Reviewed By: O1 Blessed Committers, avivey, speck

Subscribers: 20after4, avivey, speck, tobiaswiese, valerio.bozzolan

Maniphest Tasks: T15074

Differential Revision: https://we.phorge.it/D25035

authored by

Matthew Bowker and committed by
Matthew Bowker
7d435768 b293e6ff

+20
+20
src/applications/people/storage/PhabricatorUser.php
··· 320 320 const EMAIL_CYCLE_FREQUENCY = 86400; 321 321 const EMAIL_TOKEN_LENGTH = 24; 322 322 323 + /** 324 + * This function removes the blurb from a profile. 325 + * This is an incredibly broad hammer to handle some spam on the upstream, 326 + * which will be refined later. 327 + * 328 + * @return void 329 + */ 330 + private function cleanUpProfile() { 331 + $this->profile->setBlurb(''); 332 + } 333 + 323 334 public function getUserProfile() { 324 335 return $this->assertAttached($this->profile); 325 336 } 326 337 327 338 public function attachUserProfile(PhabricatorUserProfile $profile) { 328 339 $this->profile = $profile; 340 + 341 + if ($this->isDisabled) { 342 + $this->cleanUpProfile(); 343 + } 344 + 329 345 return $this; 330 346 } 331 347 ··· 340 356 341 357 if (!$this->profile) { 342 358 $this->profile = PhabricatorUserProfile::initializeNewProfile($this); 359 + } 360 + 361 + if ($this->isDisabled) { 362 + $this->cleanUpProfile(); 343 363 } 344 364 345 365 return $this->profile;