How to get user_id from sessions collection

Once we delete a user frmo usersCollection , we are forced to delete its session from sessions Collection.
How to get user:id with a User object.?

You won’t be able to get it after deleting the user from users collection. But you will be knowing email or user_id which you might have used to delete the user document. You will need to use the same one to delete from sessions collection.