/**
  * Get current authenticated use or null.
  * @return User
  */
 public function getUser()
 {
     if (!$this->isAuthenticated()) {
         return null;
     }
     $socialNetwork = $this->getSocialNetwork();
     $user = $this->userRepository->find($this->getUserId());
     if (isset($user)) {
         $user->setSocialNetwork($socialNetwork);
     }
     return $user;
 }