/** * load roles to item * * @param User $item */ private function loadAuthDrivers(&$item) { // clear roles $item->deleteAllAuthDrivers(); // set roles to item foreach ($this->getAuthDrivers($item->id) as $authDriver => $authId) { $item->addAuthDriver($authDriver, $authId); } }