@Override
    public void updateObject(APIUser modifiedObject) throws GuacamoleException {

        // A user may not use this endpoint to update their password
        try {
            User currentUser = getUserContext().self();
            if (
                    currentUser.getIdentifier().equals(modifiedObject.getUsername())
                    && modifiedObject.getPassword() != null) {
                throw new GuacamoleSecurityException(
                        "Permission denied. The password update endpoint must"
                        + " be used to change the current user's password.");
            }
        }
        catch (GuacamoleException | RuntimeException | Error e) {
            fireDirectoryFailureEvent(DirectoryEvent.Operation.UPDATE, e);
            throw e;
        }

        super.updateObject(modifiedObject);

    }
Retrieves the login (session) history of a single user.

@return
    A list of activity records, describing the start and end times of
    this user's sessions.

@throws GuacamoleException
    If an error occurs while retrieving the user history.
guacamole/src/main/java/org/apache/guacamole/rest/user/UserResource.java