@Override public boolean isShow(PortletRequest portletRequest) { ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); User user = themeDisplay.getUser(); if (user.isDefaultUser()) { return false; } return true; }
protected void exportToLDAP(Contact contact) throws Exception { if (UserImportTransactionThreadLocal.isOriginatesFromImport()) { return; } User user = _userLocalService.fetchUser(contact.getUserId()); if ((user == null) || user.isDefaultUser()) { return; } ServiceContext serviceContext = ServiceContextThreadLocal.getServiceContext(); Map<String, Serializable> expandoBridgeAttributes = null; if (serviceContext != null) { expandoBridgeAttributes = serviceContext.getExpandoBridgeAttributes(); } _userExporter.exportUser(contact, expandoBridgeAttributes); }