public function resetUgroupMembers(ProjectUGroup $user_group, array $users_to_add) { $this->getDao()->startTransaction(); $user_group->removeAllUsers(); foreach ($users_to_add as $user) { $user_group->addUser($user); } $this->getDao()->commit(); }