private String getUsernameForUserId ( int id ) { if ( id > 0 ) { String username = userIdentityStore . getPortalUserName ( id ) ; if ( username != null ) { return username ; } logger . warn ( "Invalid userID {} found when exporting a portlet; return system username instead" , id ) ; } return systemUsername ; }
Returns the username for a valid userId else the system username