@Override public void updateUser(User user, AuthorizationContext authorizationContext) { Vertex userVertex = findByIdUserVertex(user.getUserId()); ExistingElementMutation<Vertex> m = userVertex.prepareMutation(); Date currentLoginDate = UserVisalloProperties.CURRENT_LOGIN_DATE.getPropertyValue(userVertex); if (currentLoginDate != null) { UserVisalloProperties.PREVIOUS_LOGIN_DATE.setProperty(m, currentLoginDate, VISIBILITY.getVisibility()); } String currentLoginRemoteAddr = UserVisalloProperties.CURRENT_LOGIN_REMOTE_ADDR.getPropertyValue(userVertex); if (currentLoginRemoteAddr != null) { UserVisalloProperties.PREVIOUS_LOGIN_REMOTE_ADDR.setProperty( m, currentLoginRemoteAddr, VISIBILITY.getVisibility() ); } UserVisalloProperties.CURRENT_LOGIN_DATE.setProperty(m, new Date(), VISIBILITY.getVisibility()); UserVisalloProperties.CURRENT_LOGIN_REMOTE_ADDR.setProperty( m, authorizationContext.getRemoteAddr(), VISIBILITY.getVisibility() ); int loginCount = UserVisalloProperties.LOGIN_COUNT.getPropertyValue(userVertex, 0); UserVisalloProperties.LOGIN_COUNT.setProperty(m, loginCount + 1, VISIBILITY.getVisibility()); m.save(authorizations); graph.flush(); getPrivilegeRepository().updateUser(user, authorizationContext); getAuthorizationRepository().updateUser(user, authorizationContext); fireUserLoginEvent(user, authorizationContext); }