Description
If I create a new user using the Admin component
(_portalAdmin.registerUser(user.getEmailAddress(), user.getPassword(), user.getRoles(), user.getGroups(), null, profilingRules, null);
and then call the UserManager's setUserEnabled method, it will fail because it cannot find the user
(_userManager.setUserEnabled(user.getEmailAddress(), false)
I stepped through the source code and it appears that in the method:
org.apache.jetspeed.security.spi.impl.DefaultUserSecurityHander.updateUserPrincipal(UserPrincipal userPrincipal) is calling
InternalUserPrincipal internalUser = securityAccess.getInternalUserPrincipal(fullPath, false); which instead of a fullpath needs to be passed a username instead. So what happens is that it tries to find a user with "/user/myuser@blah/com" instead of "myuser@blah/com".
I have confirmed that after calling the registerUser method, the user does exist in the database and there is no reason that the InternalUserPrincipal object should be coming back null in the updateUserPrincipal method described above.