Description
Hi
I just stumbled across something I think is a bug in the checkActive(user, context) method in the com.xpn.xwiki.XWiki class.
The method's declaration (Line 5096) is:
public int checkActive(String user, XWikiContext context) throws XWikiException
and later the active check (Lines 5108-5110) is made using:
String username = context.getUser(); XWikiDocument userdoc = getDocument(username, context); active = userdoc.getIntValue("XWiki.XWikiUsers", "active");
So this method always checks if "context.getUser()" is active instead of checking it for the parameter "user", what would have been the behavior I was expecting.
The fix would be to remove the variable "username" and use "user" instead.