// employee avatar

This commit is contained in:
Rémi Gaillard
2013-10-30 18:02:10 +01:00
parent 6a3e711cff
commit 8aa369531e
5 changed files with 67 additions and 38 deletions
+9
View File
@@ -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';
}
}