title: Firebase user's email address method updateEmail is not working correctly
body: <p>I also used the re-authentication method before using before the updateEmail method. Everything working correctly. Even the toast message in the updateEmail also appears as expected but there is no change in the firebase database of the user.</p>
  
  <ol>
  <li>It detects the already existed email in the firebase database and show a toast of "Email already exist".</li>
  <li>It also works fine in checking the email from firebase and if it doesn't collide then it shows a toast message "Email upadated".</li>
  <li><p>But still it doesn't change the email in the firebase database.</p>
  
  <pre><code>FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
  
      // Get auth credentials from the user for re-authentication. The example below shows
      // email and password credentials but there are multiple possible providers,
      // such as GoogleAuthProvider or FacebookAuthProvider.
  AuthCredential credential = EmailAuthProvider
          .getCredential(mAuth.getCurrentUser().getEmail(), password);
  
      // Prompt the user to re-provide their sign-in credentials
  user.reauthenticate(credential)
          .addOnCompleteListener(new OnCompleteListener&lt;Void&gt;() {
              @Override
              public void onComplete(@NonNull Task&lt;Void&gt; task) {
  
                      if (task.isSuccessful()) {
                          Log.d(TAG, "User re-authenticated.");
                          mAuth.fetchSignInMethodsForEmail(email.getText().toString()).addOnCompleteListener(new OnCompleteListener&lt;SignInMethodQueryResult&gt;() {
                              @Override
                              public void onComplete(@NonNull Task&lt;SignInMethodQueryResult&gt; task) {
  
                                  if (task.isSuccessful()) {
  
                                      try {
  
  
                                          if (task.getResult().getSignInMethods().size() == 1) {
                                              Log.d(TAG, "onComplete: This will return the signin methods");
                                              Toast.makeText(getActivity(), "The email is already exist", Toast.LENGTH_SHORT).show();
  
  
                                      }else{
                                          Log.d(TAG, "onComplete: Email is not present. User can change it");
                                          FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
  
                                          user.updateEmail(email.getText().toString())
                                                  .addOnCompleteListener(new OnCompleteListener&lt;Void&gt;() {
                                                      @Override
                                                      public void onComplete(@NonNull Task&lt;Void&gt; task) {
                                                          if (task.isSuccessful()) {
                                                              Log.d(TAG, "User email address updated.");
                                                              Toast.makeText(getActivity(), "The email updated.", Toast.LENGTH_SHORT).show();
  
                                                          }
                                                      }
                                                  });
  
                                      }
                                  }catch(NullPointerException e) {
                                          Log.e(TAG, "onComplete: NullPointerException" + e.getMessage());
                                      }
                              }
  
                                  }
  
  
                          });
  
  
                      } else {
                          Log.d(TAG, "onComplete: User re-authentication failed.");
                      }
  
  
              }
          });
  </code></pre></li>
  </ol>