Reduce permissions (scope) and data for users by default (still can be extended via configuration)

This commit is contained in:
trogwar
2016-06-30 07:58:10 +03:00
committed by Jack Wall
parent ad2082add0
commit 887aed2956
2 changed files with 8 additions and 68 deletions

View File

@@ -58,13 +58,6 @@ class User implements ResourceOwnerInterface
// ========== Getters for default scope ==========
/**
* @return string|null
*/
public function getAbout()
{
return $this->getField('about');
}
/**
* @return string|null DD.MM.YYYY
*/
@@ -72,15 +65,6 @@ class User implements ResourceOwnerInterface
{
return $this->getField('bdate');
}
/**
* Detects is current user can post on wall of this user
*
* @return bool
*/
public function isCanPost()
{
return (bool)$this->getField('can_post');
}
/**
* @return array [id =>, title => string]
*/
@@ -88,34 +72,6 @@ class User implements ResourceOwnerInterface
{
return $this->getField('city');
}
/**
* Info about phone numbers
*
* @return array [mobile_phone = string, home_phone => string]
*/
public function getContacts()
{
return $this->getField('contacts');
}
/**
* @return array [
* albums => int,
* videos => int,
* audios => int,
* notes => int,
* photos => int,
* groups => int,
* gifts => int,
* friends => int,
* online_friends => int,
* user_videos => int,
* followers => int,
* ]
*/
public function getCounters()
{
return $this->getField('counters');
}
/**
* @return array [id =>, title => string]
*/
@@ -146,15 +102,6 @@ class User implements ResourceOwnerInterface
{
return $this->getField('friend_Status');
}
/**
* Do we know mobile phone number
*
* @return bool
*/
public function isHasMobile()
{
return (bool)$this->getField('has_mobile');
}
/**
* Has user avatar?
*
@@ -233,11 +180,4 @@ class User implements ResourceOwnerInterface
{
return $this->getField('sex');
}
/**
* @return int
*/
public function getTimezone()
{
return $this->getField('timezone');
}
}