// employee avatar
This commit is contained in:
@@ -126,6 +126,8 @@ class EmployeeCore extends ObjectModel
|
||||
|
||||
if ($this->id)
|
||||
$this->associated_shops = $this->getAssociatedShops();
|
||||
|
||||
$this->image_dir = _PS_EMPLOYEE_IMG_DIR_;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -347,4 +349,11 @@ class EmployeeCore extends ObjectModel
|
||||
{
|
||||
return $this->id_profile == _PS_ADMIN_PROFILE_;
|
||||
}
|
||||
|
||||
public function getImage()
|
||||
{
|
||||
if (!isset($this->id) || empty($this->id) || !file_exists($this->image_dir.$this->id.'.jpg'))
|
||||
return _PS_IMG_DIR_.'prestashop-avatar.png';
|
||||
return $this->image_dir.$this->id.'.jpg';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user