Commit bbf80995 authored by Greg Thomas's avatar Greg Thomas

Re-order check of use to take advantage of the quicker component check

parent 5b46a8ed
......@@ -543,7 +543,7 @@ public class PubSubEngine {
return;
}
// Check if the subscriber is an anonymous user
if (!UserManager.getInstance().isRegisteredUser(subscriberJID) && !isComponent(subscriberJID)) {
if (!isComponent(subscriberJID) && !UserManager.getInstance().isRegisteredUser(subscriberJID)) {
// Anonymous users cannot subscribe to the node. Return forbidden error
sendErrorPacket(iq, PacketError.Condition.forbidden, null);
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment