/**
  * @param User $user
  *
  * @return DiamanteUser|OroUser
  */
 public function getByUser(User $user)
 {
     if ($user->isOroUser()) {
         $user = $this->oroUserManager->findUserBy(array('id' => $user->getId()));
     } else {
         $user = $this->diamanteUserRepository->get($user->getId());
     }
     if (!$user) {
         throw new \RuntimeException('User loading failed. User not found');
     }
     return $user;
 }