User user = null;
try{
user = userDirectoryService.getUser(userId);
} catch (UserNotDefinedException e) {
e.printStackTrace();
<BUG>}
MembershipItem memberItem = MembershipItem.getInstance();</BUG>
memberItem.setType(MembershipItem.TYPE_USER);
memberItem.setName(user.getSortName());
memberItem.setUser(user);

User user = null;
try{
user = userDirectoryService.getUser(userId);
} catch (UserNotDefinedException e) {
e.printStackTrace();
}
if(user != null)
{
MembershipItem memberItem = MembershipItem.getInstance();
memberItem.setType(MembershipItem.TYPE_USER);
memberItem.setName(user.getSortName());
memberItem.setUser(user);
