title: Get current user details in firebase database
body: <p>This is pretty direct forward but I have a problem with multiple users.When the first user signs in,his name and email are fetched with no issues but when he signs out and another user signs in (same phone), current user details return null.</p>
  
  <pre><code>        FirebaseAuth firebaseAuth = FirebaseAuth.getInstance();
          String uid = Objects.requireNonNull(firebaseAuth.getCurrentUser()).getUid();
          userDetails = FirebaseDatabase.getInstance().getReference().child("Users").child(uid);
          myref.keepSynced(true);
          userDetails.keepSynced(true);
  
          name = view.findViewById(R.id.my_name);
          mail = view.findViewById(R.id.my_mail);
          userDetails.addListenerForSingleValueEvent(new ValueEventListener() {
              @Override
              public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
                  String Name = dataSnapshot.child("name").getValue().toString();
                  String Email = dataSnapshot.child("email").getValue().toString();
  
                  name.setText(Name);
                  mail.setText(Email);
              }
  
              @Override
              public void onCancelled(@NonNull DatabaseError databaseError) {
  
              }
          });
  </code></pre>