Returns the changes of this user compared to the previous user data.<p>

@param oldUser the old user

@return the changes flags
765743
public int getChanges(CmsUser oldUser) {

        int result = 0;
        if (oldUser.m_lastlogin != m_lastlogin) {
            result = result | FLAG_LAST_LOGIN;
        }
        if (!oldUser.m_additionalInfo.equals(m_additionalInfo)) {
            result = result | FLAG_ADDITIONAL_INFOS;
        }
        if (!Objects.equals(oldUser.m_email, m_email)
            || !Objects.equals(oldUser.m_description, m_description)
            || !Objects.equals(oldUser.m_firstname, m_firstname)
            || !Objects.equals(oldUser.m_lastname, m_lastname)
            || !Objects.equals(oldUser.m_password, m_password)
            || (oldUser.m_flags != m_flags)) {
            result = result | FLAG_CORE_DATA;
        }
        return result;
    }
410756
@Programmatic
    public List<CommandJdo> findRecentByUser(final String user) {
        return repositoryService.allMatches(
                new QueryDefault<>(CommandJdo.class, "findRecentByUser", "user", user));

    }
1275967
public List<Change> getChanges(Predicate<Change> predicate) {
        return Lists.positiveFilter(changes, predicate);
    }
614302
public List<User> getAllUsers() {
        List<User> r = new ArrayList<User>();
        for (User u : User.getAll()) {
            if(u.getProperty(Details.class)!=null)
                r.add(u);
        }
        Collections.sort(r);
        return r;
    }
411645
private int getFlags() {

        int flags = 0;
        if (m_hideLogin.getValue().booleanValue()) {
            flags += CmsOrganizationalUnit.FLAG_HIDE_LOGIN;
        }
        if (m_webuser.getValue().booleanValue()) {
            flags += CmsOrganizationalUnit.FLAG_WEBUSERS;
        }
        return flags;
    }
243863
@Restricted(NoExternalUse.class)
    public boolean hasFreshToken(@Nonnull User user, @Nullable ApiTokenProperty.TokenInfoAndStats legacyStats) {
        if (legacyStats == null) {
            return false;
        }
        
        ApiTokenProperty apiTokenProperty = user.getProperty(ApiTokenProperty.class);
        
        return apiTokenProperty.getTokenList().stream()
                .filter(token -> !token.isLegacy)
                .anyMatch(token -> {
                    Date creationDate = token.creationDate;
                    Date lastUseDate = legacyStats.lastUseDate;
                    if (lastUseDate == null) {
                        lastUseDate = legacyStats.creationDate;
                    }
                    return creationDate != null && lastUseDate != null && creationDate.after(lastUseDate);
                });
    }
1022221
public GenericUser getUserForUserReference(String userReference) {
    	GenericUser user = getReference(GenericUser.class, userReference);
        if (user == null) {
            fail("No user of type '" + userReference + "' is found. Available user references are: " + getObjectReferenceMap(GenericUser.class).keySet().toString());
        }
        return user;
    }
52534
public List<ChangesContainer> getSortedList()
   {
      List<ChangesContainer> changesContainers = new ArrayList<ChangesContainer>(changes);
      Collections.sort(changesContainers);
      return changesContainers;
   }
44586
@Column(header = org.opencms.workplace.commons.Messages.GUI_LABEL_USER_LAST_MODIFIED_0, order = 70)
    public String getUserLastModified() {

        return m_bean.getUserLastModified();
    }
1252923
public java.lang.String getOnchange() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.onchange);

    }
213898
public com.google.api.ChangeType getChangeType() {
    @SuppressWarnings("deprecation")
    com.google.api.ChangeType result = com.google.api.ChangeType.valueOf(changeType_);
    return result == null ? com.google.api.ChangeType.UNRECOGNIZED : result;
  }
979257
public Map<String, Object> getUser() {
        Map<String, Object> userFields = DDPStateSingleton.getInstance()
                .getDocument("users", getUserId());
        if (userFields != null) {
            return userFields;
        }
        return null;
    }
1269598
public UserStateListResult[] getUsersState(String... users) throws APIConnectionException, APIRequestException {
        JsonArray jsonArray = new JsonArray();
        for (String username : users) {
            StringUtils.checkUsername(username);
            jsonArray.add(new JsonPrimitive(username));
        }
        ResponseWrapper response = _httpClient.sendPost(_baseUrl + userPath + "/userstat", jsonArray.toString());
        return _gson.fromJson(response.responseContent, UserStateListResult[].class);
    }
370054
public void updateChangeLog(final Principal user, final Verb verb, final PropertyKey key, final Object previousValue, final Object newValue) {

		if ((Settings.ChangelogEnabled.getValue() || Settings.UserChangelogEnabled.getValue()) && key != null) {

			final String name = key.jsonName();

			if (!hiddenPropertiesInAuditLog.contains(name) && !(key.isUnvalidated() || key.isReadOnly())) {

				final JsonObject obj = new JsonObject();

				obj.add("time",     toElement(System.currentTimeMillis()));
				obj.add("userId",   toElement(user.getUuid()));
				obj.add("userName", toElement(user.getName()));
				obj.add("verb",     toElement(verb));
				obj.add("key",      toElement(key.jsonName()));
				obj.add("prev",     toElement(previousValue));
				obj.add("val",      toElement(newValue));

				if (Settings.ChangelogEnabled.getValue()) {
					changeLog.append(obj.toString());
					changeLog.append("\n");
				}

				if (Settings.UserChangelogEnabled.getValue()) {

					// remove user for user-centric logging to reduce redundancy
					obj.remove("userId");
					obj.remove("userName");

					// add target to identify change event
					obj.add("target", toElement(getUuid()));

					appendUserChangelog(user.getUuid(), obj.toString());
				}
			}
		}
	}
942719
public ChangesHolder getChanges(final Set<String> removedNodes, final Set<String> addedNodes)
   {
      if (handler != null)
      {
         Iterator<NodeData> addedStates = new Iterator<NodeData>()
         {
            private final Iterator<String> iter = addedNodes.iterator();

            public boolean hasNext()
            {
               return iter.hasNext();
            }

            public NodeData next()
            {

               // cycle till find a next or meet the end of set
               do
               {
                  String id = iter.next();
                  try
                  {
                     ItemData item = itemMgr.getItemData(id);
                     if (item != null)
                     {
                        if (item.isNode())
                        {
                           if (!indexingTree.isExcluded(item))
                           {
                              return (NodeData)item;
                           }
                        }
                        else
                        {
                           LOG.warn("Node not found, but property " + id + ", " + item.getQPath().getAsString()
                              + " found. ");
                        }
                     }
                     else
                     {
                        LOG.warn("Unable to index node with id " + id + ", node does not exist.");
                     }

                  }
                  catch (RepositoryException e)
                  {
                     LOG.error("Can't read next node data " + id, e);
                  }
               }
               while (iter.hasNext()); // get next if error or node not found

               return null; // we met the end of iterator set
            }

            public void remove()
            {
               throw new UnsupportedOperationException();
            }
         };

         Iterator<String> removedIds = new Iterator<String>()
         {
            private final Iterator<String> iter = removedNodes.iterator();

            public boolean hasNext()
            {
               return iter.hasNext();
            }

            public String next()
            {
               return nextNodeId();
            }

            public String nextNodeId() throws NoSuchElementException
            {
               return iter.next();
            }

            public void remove()
            {
               throw new UnsupportedOperationException();

            }
         };

         if (removedNodes.size() > 0 || addedNodes.size() > 0)
         {
            return handler.getChanges(removedIds, addedStates);
         }
      }
      return null;
   }
178098
public ApiResponse changePassword(String username, String oldPassword,
            String newPassword) {

        Map<String, Object> data = new HashMap<String, Object>();
        data.put("newpassword", newPassword);
        data.put("oldpassword", oldPassword);

        return apiRequest(HttpMethod.POST, null, data, organizationId,  applicationId, "users",
                username, "password");

    }
375285
private void addUserLastModifiedColumn() {

        addColumn(CmsHistoryMessages.columnUserLastModified(), 120, new TextColumn<CmsHistoryResourceBean>() {

            @Override
            public String getValue(CmsHistoryResourceBean historyRes) {

                return historyRes.getUserLastModified();
            }
        });
    }