@Autowired
protected MessageUtils messageUtils;
protected UserDetails getUser() {
BlogUser user = BlogUser.getInstance();
LdapUserDetailsImpl userDetails = (LdapUserDetailsImpl) SecurityContextHolder.getContext().getAuthentication()
.getPrincipal();
BeanUtils.copyProperties(userDetails, user);
return userDetailsService.getUserDetailsByUsername(user.getUsername());
}