Remove PhabricatorUser->loadPreferences()
Summary: Ref T4103. This method has no more callers. Test Plan: `grep` Reviewers: chad Reviewed By: chad Maniphest Tasks: T4103 Differential Revision: https://secure.phabricator.com/D16039
This commit is contained in:
		| @@ -568,29 +568,6 @@ final class PhabricatorUser | |||||||
|     return $this->getUserSetting(PhabricatorPronounSetting::SETTINGKEY); |     return $this->getUserSetting(PhabricatorPronounSetting::SETTINGKEY); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   public function loadPreferences() { |  | ||||||
|     if ($this->preferences) { |  | ||||||
|       return $this->preferences; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     $preferences = null; |  | ||||||
|     if ($this->getPHID()) { |  | ||||||
|       $preferences = id(new PhabricatorUserPreferencesQuery()) |  | ||||||
|         ->setViewer($this) |  | ||||||
|         ->withUsers(array($this)) |  | ||||||
|         ->executeOne(); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     if (!$preferences) { |  | ||||||
|       $preferences = new PhabricatorUserPreferences(); |  | ||||||
|       $preferences->setUserPHID($this->getPHID()); |  | ||||||
|       $preferences->attachUser($this); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     $this->preferences = $preferences; |  | ||||||
|     return $preferences; |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   public function loadEditorLink( |   public function loadEditorLink( | ||||||
|     $path, |     $path, | ||||||
|     $line, |     $line, | ||||||
|   | |||||||
| @@ -98,16 +98,6 @@ final class PhabricatorUserPreferences | |||||||
|     return false; |     return false; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   // TODO: Remove this once all edits go through the Editor. For now, some |  | ||||||
|   // old edits just do direct saves so make sure we nuke the cache. |  | ||||||
|   public function save() { |  | ||||||
|     PhabricatorUserCache::clearCache( |  | ||||||
|       PhabricatorUserPreferencesCacheType::KEY_PREFERENCES, |  | ||||||
|       $this->getUserPHID()); |  | ||||||
|  |  | ||||||
|     return parent::save(); |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * Load or create a preferences object for the given user. |    * Load or create a preferences object for the given user. | ||||||
|    * |    * | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 epriestley
					epriestley