title: Symfony2: Make users complete registration after login if some fields are missing
body: <p>I'm using HWIOAuthBundle to let an user login with Oauth, I've created a custom user provider which creates an user in case it doesn't exist:</p>
  
  <pre><code>public function loadUserByOAuthUserResponse(UserResponseInterface $response)
  {
      $attr = $response-&gt;getResponse();
      switch($response-&gt;getResourceOwner()-&gt;getName()) {
          case 'google':
              if(!$user = $this-&gt;userRepository-&gt;findOneByGoogleId($attr['id'])) {
                  if(($user = $this-&gt;userRepository-&gt;findOneByEmail($attr['email'])) &amp;&amp; $attr['verified_email']) {
                      $user-&gt;setGoogleId($attr['id']);
                      if(!$user-&gt;getFirstname()) {
                          $user-&gt;setFirstname($attr['given_name']);
                      }
                      if(!$user-&gt;getLastname()) {
                          $user-&gt;setLastname($attr['family_name']);
                      }
                      $user-&gt;setGoogleName($attr['name']);
                  }else{
                      $user = new User();
                      $user-&gt;setUsername($this-&gt;userRepository-&gt;createUsernameByEmail($attr['email']));
                      $user-&gt;setEmail($attr['email']);
                      $user-&gt;setFirstname($attr['given_name']);
                      $user-&gt;setLastname($attr['family_name']);
                      $user-&gt;setPassword('');
                      $user-&gt;setIsActive(true);
                      $user-&gt;setGoogleId($attr['id']);
                      $user-&gt;setGoogleName($attr['name']);
                      $user-&gt;addGroup($this-&gt;groupRepository-&gt;findOneByRole('ROLE_USER'));
                      $this-&gt;entityManager-&gt;persist($user);
                  }
              }
              break;
          case 'facebook':
              if(!$user = $this-&gt;userRepository-&gt;findOneByFacebookId($attr['id'])) {
                  if(($user = $this-&gt;userRepository-&gt;findOneByEmail($attr['email'])) &amp;&amp; $attr['verified']) {
                      $user-&gt;setFacebookId($attr['id']);
                      if(!$user-&gt;getFirstname()) {
                          $user-&gt;setFirstname($attr['first_name']);
                      }
                      if(!$user-&gt;getLastname()) {
                          $user-&gt;setLastname($attr['last_name']);
                      }
                      $user-&gt;setFacebookUsername($attr['username']);
                  }else{
                      $user = new User();
                      $user-&gt;setUsername($this-&gt;userRepository-&gt;createUsernameByEmail($attr['email']));
                      $user-&gt;setEmail($attr['email']);
                      $user-&gt;setFirstname($attr['first_name']);
                      $user-&gt;setLastname($attr['last_name']);
                      $user-&gt;setPassword('');
                      $user-&gt;setIsActive(true);
                      $user-&gt;setFacebookId($attr['id']);
                      $user-&gt;setFacebookUsername($attr['username']);
                      $user-&gt;addGroup($this-&gt;groupRepository-&gt;findOneByRole('ROLE_USER'));
                      $this-&gt;entityManager-&gt;persist($user);
                  }
              }
              break;
      }
  
      $this-&gt;entityManager-&gt;flush();
  
  
      if (null === $user) {
          throw new AccountNotLinkedException(sprintf("User '%s' not found.", $attr['email']));
      }
  
      return $user;
  }
  </code></pre>
  
  <p>The problem is that twitter for example doesn't give the email or i want some additional fields to be included before a new user is created. Is there a way to redirect an user to a "complete registration" form before creating it?</p>
  
  <p>I've tried to add a request listener, that on each request, if the user is logged, checks if the email is there and if it doesn't it redirects to the complete_registration page, but it will redirect also if the user goes to the homepage, to logout or anything else, I want to redirect him only if he tries to access some user restricted pages.</p>
  
  <p>Or better, don't create it until he gives all the required informations.</p>