/** * */ public static function getStringListOfUserForOrderList() { $safeinstance = new SafinstancesUsers(); $safeinstanceSelector = $safeinstance->select()->from($safeinstance->getTableName(), 'users_id as id')->where('safinstances_id = ' . Sydney_Tools::getSafinstancesId()); $safeinstanceResult = $safeinstance->fetchAll($safeinstanceSelector)->toArray(); $listUsers = Sydney_Tools::implode(', ', $safeinstanceResult); $users = new Users(); $usersSelector = $users->select()->from($users->getTableName(), 'id')->where('id NOT IN (' . $listUsers . ')')->where('safinstances_id = ' . Sydney_Tools::getSafinstancesId()); $usersResult = $users->fetchAll($usersSelector)->toArray(); if (count($usersResult) > 0) { if (!empty($listUsers)) { $listUsers .= ', '; } $listUsers .= Sydney_Tools::implode(', ', $usersResult); } return $listUsers; }