ISSUE SUMMARY
User management shell helpers like dropUser(), getUser() and getRole() show inconsistent behavior when a user is not found. Specifically, getUser() and getRole() throw an exception, but dropUser() returns false.
USER IMPACT
Minor impact, but user interface changes slightly, which may affect users who automate or script MongoDB user management.
WORKAROUNDS
None.
RESOLUTION
Change the behavior so that getUser() and getRole() do not throw but instead return null if the user does not exist.
AFFECTED VERSIONS
Version 2.6.0 is affected by this bug.
PATCHES
The patch is included in the 2.6.1 production release.
Original description
Other user management helpers such as dropUser do not throw if the user is not found - dropUser just returns false. We should change getUser and getRole to simply return null if the user/role isn't found