// Fix bug on auths for sub employees #PSFV-849
This commit is contained in:
@@ -1076,6 +1076,24 @@ abstract class ObjectModelCore
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of associated id_shop
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @return array
|
||||
*/
|
||||
public function getAssociatedShops()
|
||||
{
|
||||
if (!Shop::isTableAssociated($this->def['table']))
|
||||
return array();
|
||||
|
||||
$list = array();
|
||||
$sql = 'SELECT id_shop FROM `'._DB_PREFIX_.$this->def['table'].'_shop` WHERE `'.$this->def['primary'].'` = '.(int)$this->id;
|
||||
foreach (Db::getInstance()->executeS($sql) as $row)
|
||||
$list[] = $row['id_shop'];
|
||||
return $list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.5.0
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user