CloudAssest hotfix
Change-Id: I23f38fa7e5c86e44ff055259091ee3dc2256a49d
This commit is contained in:
parent
84df8f2923
commit
7d45396b79
@ -1084,12 +1084,34 @@ SQL;
|
||||
return $fullname;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasPhoto(){
|
||||
return $this->getPhotoId() > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getPhotoId()
|
||||
{
|
||||
try{
|
||||
if(is_null($this->photo)) return 0;
|
||||
return $this->photo->getId();
|
||||
}
|
||||
catch(\Exception $ex){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getProfilePhotoUrl():string{
|
||||
$photoUrl = null;
|
||||
if($photo = $this->getPhoto()){
|
||||
if($this->hasPhoto() && $photo = $this->getPhoto()){
|
||||
$photoUrl = $photo->getUrl();
|
||||
}
|
||||
if(empty($photo_url) && !empty($this->getTwitterHandle()) ){
|
||||
|
@ -1579,15 +1579,36 @@ SQL;
|
||||
return $email ? $email->getType() : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasPhoto(){
|
||||
return $this->getPhotoId() > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getPhotoId()
|
||||
{
|
||||
try{
|
||||
if(is_null($this->photo)) return 0;
|
||||
return $this->photo->getId();
|
||||
}
|
||||
catch(\Exception $ex){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getProfilePhotoUrl():string{
|
||||
$photoUrl = null;
|
||||
if($photo = $this->getPhoto()){
|
||||
if($this->hasPhoto() && $photo = $this->getPhoto()){
|
||||
$photoUrl = $photo->getUrl();
|
||||
}
|
||||
if(empty($photo_url) && $this->hasMember() && $photo = $this->member->getPhoto()){
|
||||
if(empty($photo_url) && $this->hasMember() && $this->member->hasPhoto() && $photo = $this->member->getPhoto()){
|
||||
$photoUrl = $photo->getUrl();
|
||||
}
|
||||
if(empty($photo_url) && !empty($this->getTwitterName()) ){
|
||||
|
Loading…
x
Reference in New Issue
Block a user