[*] BO : A new method in Employee class has been written "getEmployeesByProfile". it returns an array of employees who has the given profile.

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12787 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mBertholino
2012-01-30 10:16:09 +00:00
parent 2c688050b6
commit 8b74487eac
2 changed files with 22 additions and 0 deletions
+9
View File
@@ -298,4 +298,13 @@ class EmployeeCore extends ObjectModel
$data[] = (int)$group_data['id_shop'];
return $data;
}
public static function getEmployeesByProfile($id_profile, $active_only = false)
{
return Db::getInstance()->executeS('
SELECT *
FROM `'._DB_PREFIX_.'employee`
WHERE `id_profile` = '.(int)$id_profile.'
'.($active_only ? ' AND `active` = 1' : ''));
}
}