Note: it does not matter if User B has enter the room or not
I believe that user B SHOULD be allowed to enter the room as per
XEP-0045 9.5 Modifying the Member List
Luca.
Note: A service SHOULD also return the member list to any occupant in a members-only room; i.e., it SHOULD NOT generate a error when a member in the room requests the member list. This functionality can assist clients in showing all the existing members even if some of them are not in the room, e.g. to help a member determine if another user should be invited. A service SHOULD also allow any member to retrieve the member list even if not yet an occupant.
From http://www.tigase.org/content/users-members-only-muc-room-should-be-allowed-request-member-list :