}
}
if (isLoginRestrictedToNickname()) {
String reservedNickname = members.get(user.getAddress().toBareJID());
if (reservedNickname != null && !nickname.equals(reservedNickname)) {
throw new NotAcceptableException();
}
}
// Set the corresponding role based on the user's affiliation
MUCRole.Role role;