|
@@ -11,6 +11,8 @@ bx_import('BxDolAcl');
|
|
|
|
|
|
|
|
class BxDolAccount extends BxDolFactory implements iBxDolSingleton
|
|
class BxDolAccount extends BxDolFactory implements iBxDolSingleton
|
|
|
{
|
|
{
|
|
|
|
|
+ protected $_bIsApi;
|
|
|
|
|
+
|
|
|
protected $_iAccountID;
|
|
protected $_iAccountID;
|
|
|
protected $_aInfo;
|
|
protected $_aInfo;
|
|
|
protected $_oQuery;
|
|
protected $_oQuery;
|
|
@@ -30,6 +32,8 @@ class BxDolAccount extends BxDolFactory implements iBxDolSingleton
|
|
|
|
|
|
|
|
parent::__construct();
|
|
parent::__construct();
|
|
|
|
|
|
|
|
|
|
+ $this->_bIsApi = bx_is_api();
|
|
|
|
|
+
|
|
|
$this->_iAccountID = $iAccountId; // since constructor is protected $iAccountId is always valid
|
|
$this->_iAccountID = $iAccountId; // since constructor is protected $iAccountId is always valid
|
|
|
$this->_oQuery = BxDolAccountQuery::getInstance();
|
|
$this->_oQuery = BxDolAccountQuery::getInstance();
|
|
|
|
|
|
|
@@ -636,6 +640,9 @@ class BxDolAccount extends BxDolFactory implements iBxDolSingleton
|
|
|
*/
|
|
*/
|
|
|
public function getPicture($iAccountId = false)
|
|
public function getPicture($iAccountId = false)
|
|
|
{
|
|
{
|
|
|
|
|
+ if($this->_bIsApi)
|
|
|
|
|
+ return '';
|
|
|
|
|
+
|
|
|
$sImageUrl = $this->_getImageUrl('picture', $iAccountId);
|
|
$sImageUrl = $this->_getImageUrl('picture', $iAccountId);
|
|
|
if(!$sImageUrl)
|
|
if(!$sImageUrl)
|
|
|
$sImageUrl = BxDolTemplate::getInstance()->getImageUrl('account.svg');
|
|
$sImageUrl = BxDolTemplate::getInstance()->getImageUrl('account.svg');
|
|
@@ -648,6 +655,9 @@ class BxDolAccount extends BxDolFactory implements iBxDolSingleton
|
|
|
*/
|
|
*/
|
|
|
public function getAvatarBig($iAccountId = false)
|
|
public function getAvatarBig($iAccountId = false)
|
|
|
{
|
|
{
|
|
|
|
|
+ if($this->_bIsApi)
|
|
|
|
|
+ return '';
|
|
|
|
|
+
|
|
|
$sImageUrl = $this->_getImageUrl('ava_big', $iAccountId);
|
|
$sImageUrl = $this->_getImageUrl('ava_big', $iAccountId);
|
|
|
if(!$sImageUrl)
|
|
if(!$sImageUrl)
|
|
|
$sImageUrl = BxDolTemplate::getInstance()->getImageUrl('account.svg');
|
|
$sImageUrl = BxDolTemplate::getInstance()->getImageUrl('account.svg');
|
|
@@ -660,6 +670,9 @@ class BxDolAccount extends BxDolFactory implements iBxDolSingleton
|
|
|
*/
|
|
*/
|
|
|
public function getAvatar($iAccountId = false)
|
|
public function getAvatar($iAccountId = false)
|
|
|
{
|
|
{
|
|
|
|
|
+ if($this->_bIsApi)
|
|
|
|
|
+ return '';
|
|
|
|
|
+
|
|
|
$sImageUrl = $this->_getImageUrl('ava', $iAccountId);
|
|
$sImageUrl = $this->_getImageUrl('ava', $iAccountId);
|
|
|
if(!$sImageUrl)
|
|
if(!$sImageUrl)
|
|
|
$sImageUrl = BxDolTemplate::getInstance()->getImageUrl('account.svg');
|
|
$sImageUrl = BxDolTemplate::getInstance()->getImageUrl('account.svg');
|
|
@@ -672,6 +685,9 @@ class BxDolAccount extends BxDolFactory implements iBxDolSingleton
|
|
|
*/
|
|
*/
|
|
|
public function getThumb($iAccountId = false)
|
|
public function getThumb($iAccountId = false)
|
|
|
{
|
|
{
|
|
|
|
|
+ if($this->_bIsApi)
|
|
|
|
|
+ return '';
|
|
|
|
|
+
|
|
|
$sImageUrl = $this->_getImageUrl('thumb', $iAccountId);
|
|
$sImageUrl = $this->_getImageUrl('thumb', $iAccountId);
|
|
|
if(!$sImageUrl)
|
|
if(!$sImageUrl)
|
|
|
$sImageUrl = BxDolTemplate::getInstance()->getImageUrl('account.svg');
|
|
$sImageUrl = BxDolTemplate::getInstance()->getImageUrl('account.svg');
|
|
@@ -684,6 +700,9 @@ class BxDolAccount extends BxDolFactory implements iBxDolSingleton
|
|
|
*/
|
|
*/
|
|
|
public function getIcon($iAccountId = false)
|
|
public function getIcon($iAccountId = false)
|
|
|
{
|
|
{
|
|
|
|
|
+ if($this->_bIsApi)
|
|
|
|
|
+ return '';
|
|
|
|
|
+
|
|
|
$sImageUrl = $this->_getImageUrl('icon', $iAccountId);
|
|
$sImageUrl = $this->_getImageUrl('icon', $iAccountId);
|
|
|
if(!$sImageUrl)
|
|
if(!$sImageUrl)
|
|
|
$sImageUrl = BxDolTemplate::getInstance()->getImageUrl('account.svg');
|
|
$sImageUrl = BxDolTemplate::getInstance()->getImageUrl('account.svg');
|