renaming getPreferences method to loadPreferences to indicate you are

not "get"ing anything
This commit is contained in:
Pepijn Over 2014-05-04 13:40:42 +02:00
parent c58a91fc3b
commit 87dea7f6d0
1 changed files with 3 additions and 3 deletions

View File

@ -445,7 +445,7 @@ class User {
* read current user preferences from the database
* @return boolean return false is user not connected
*/
private function getPreferences() {
protected function loadPreferences() {
if($this->user_preferences === null) {
if(!$this->getUser()) {
return false;
@ -466,7 +466,7 @@ class User {
* @return mixed
*/
public function getUserPref($key, $default = '') {
if(!$this->getPreferences() || !isset($this->user_preferences[$key])) {
if(!$this->loadPreferences() || !isset($this->user_preferences[$key])) {
return $default;
}
@ -481,7 +481,7 @@ class User {
* @param mixed $value
*/
public function setUserPref($key, $value) {
if($this->getPreferences()) {
if($this->loadPreferences()) {
if(isset($this->user_preferences[$key])) {
if($this->user_preferences[$key] == $value) {
return; // no change