src/org/ohmage/lib/OhmageApi.java
public void updateUser(final String authenticationToken, 
			final String client, final String username, 
			final Boolean admin, final Boolean enabled, 
			final Boolean newAccount, final Boolean campaignCreationPrivilege,
			final String firstName, final String lastName,
			final String organization, final String personalId,
			final String emailAddress)
			throws ApiException, RequestErrorException {
		
		Map<String, Object> parameters = new HashMap<String, Object>();
		parameters.put(InputKeys.AUTH_TOKEN, authenticationToken);
		parameters.put(InputKeys.CLIENT, client);
		parameters.put(InputKeys.USERNAME, username);
		parameters.put(InputKeys.USER_ADMIN, admin);
		parameters.put(InputKeys.USER_ENABLED, enabled);
		parameters.put(InputKeys.NEW_ACCOUNT, newAccount);
		parameters.put(InputKeys.CAMPAIGN_CREATION_PRIVILEGE, campaignCreationPrivilege);
		parameters.put(InputKeys.FIRST_NAME, firstName);
		parameters.put(InputKeys.LAST_NAME, lastName);
		parameters.put(InputKeys.ORGANIZATION, organization);
		parameters.put(InputKeys.PERSONAL_ID, personalId);
		parameters.put(InputKeys.EMAIL_ADDRESS, emailAddress);
		
		try {
			makeRequest(
					new URL(url.toString() + RequestBuilder.getInstance().getApiUserUpdate()), 
					parameters, 
					false
				);
		}
		catch(MalformedURLException e) {
			throw new ApiException("The URL was incorrectly created.", e);
		}
		catch(IllegalArgumentException e) {
			throw new ApiException("The response was not proper JSON.", e);
		}
	}
/**
	 * Updates a user's information.
	 * 
	 * @param authenticationToken The user's authentication token. Required.
	 * 
	 * @param client The client value. Required.
	 * 
	 * @param username The username of the user to be updated. Required.
	 * 
	 * @param admin Whether or not the user should be an admin. Optional.
	 * 
	 * @param enabled Whether or not the user's account should be enabled.
	 * 				  Optional.
	 * 
	 * @param newAccount Whether or not the user should be forced to change 
	 * 					 their password the next time they login. Optional.
	 * 
	 * @param campaignCreationPrivilege Whether or not the usr is allowed to
	 * 									create campaigns. Optional.
	 * 
	 * @param firstName The user's new first name. Optional.
	 * 
	 * @param lastName The user's new last name. Optional.
	 * 
	 * @param organization The user's new organization. Optional.
	 * 
	 * @param personalId The user's new personal identifier. Optional.
	 * 
	 * @param emailAddress The user's email address. Optional.
	 * 
	 * @param jsonData The user's new JSON data. It is advised to get the old
	 * 				   JSON data and update accordingly. Optional.
	 * 
	 * @throws ApiException Thrown if there is a library error.
	 * 
	 * @throws RequestErrorException Thrown if the server returns an error.
	 */
Updates a user's information.

@param authenticationToken The user's authentication token. Required.

@param client The client value. Required.

@param username The username of the user to be updated. Required.

@param admin Whether or not the user should be an admin. Optional.

@param enabled Whether or not the user's account should be enabled.
Optional.

@param newAccount Whether or not the user should be forced to change
their password the next time they login. Optional.

@param campaignCreationPrivilege Whether or not the usr is allowed to
create campaigns. Optional.

@param firstName The user's new first name. Optional.

@param lastName The user's new last name. Optional.

@param organization The user's new organization. Optional.

@param personalId The user's new personal identifier. Optional.

@param emailAddress The user's email address. Optional.

@param jsonData The user's new JSON data. It is advised to get the old
JSON data and update accordingly. Optional.

@throws ApiException Thrown if there is a library error.

@throws RequestErrorException Thrown if the server returns an error.
Updates a user ' s information . @param authenticationToken The user ' s authentication token . Required . @param client The client value . Required . @param username The username of the user to be updated . Required . @param admin Whether or not the user should be an admin . Optional . @param enabled Whether or not the user ' s account should be enabled . Optional . @param newAccount Whether or not the user should be forced to change their password the next time they login . Optional . @param campaignCreationPrivilege Whether or not the usr is allowed to create campaigns . Optional . @param firstName The user ' s new first name . Optional . @param lastName The user ' s new last name . Optional . @param organization The user ' s new organization . Optional . @param personalId The user ' s new personal identifier . Optional . @param emailAddress The user ' s email address . Optional . @param jsonData The user ' s new JSON data . It is advised to get the old JSON data and update accordingly . Optional . @throws ApiException Thrown if there is a library error . @throws RequestErrorException Thrown if the server returns an error .
public void updateUser(final String authenticationToken, 
			final String client, final String username, 
			final Boolean admin, final Boolean enabled, 
			final Boolean newAccount, final Boolean campaignCreationPrivilege,
			final String firstName, final String lastName,
			final String organization, final String personalId,
			final String emailAddress)
			throws ApiException, RequestErrorException {
		Map<String, Object> parameters = new HashMap<String, Object>();
		parameters.put(InputKeys.AUTH_TOKEN, authenticationToken);
		parameters.put(InputKeys.CLIENT, client);
		parameters.put(InputKeys.USERNAME, username);
		parameters.put(InputKeys.USER_ADMIN, admin);
		parameters.put(InputKeys.USER_ENABLED, enabled);
		parameters.put(InputKeys.NEW_ACCOUNT, newAccount);
		parameters.put(InputKeys.CAMPAIGN_CREATION_PRIVILEGE, campaignCreationPrivilege);
		parameters.put(InputKeys.FIRST_NAME, firstName);
		parameters.put(InputKeys.LAST_NAME, lastName);
		parameters.put(InputKeys.ORGANIZATION, organization);
		parameters.put(InputKeys.PERSONAL_ID, personalId);
		parameters.put(InputKeys.EMAIL_ADDRESS, emailAddress);
		try {
			makeRequest(
					new URL(url.toString() + RequestBuilder.getInstance().getApiUserUpdate()), 
					parameters, 
					false
				);
		}
		catch(MalformedURLException e) {
			throw new ApiException("The URL was incorrectly created.", e);
		}
		catch(IllegalArgumentException e) {
			throw new ApiException("The response was not proper JSON.", e);
		}
	}
public void updateUser ( final String authenticationToken , final String client , final String username , final Boolean admin , final Boolean enabled , final Boolean newAccount , final Boolean campaignCreationPrivilege , final String firstName , final String lastName , final String organization , final String personalId , final String emailAddress ) throws ApiException , RequestErrorException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( InputKeys . AUTH_TOKEN , authenticationToken ) ; parameters . put ( InputKeys . CLIENT , client ) ; parameters . put ( InputKeys . USERNAME , username ) ; parameters . put ( InputKeys . USER_ADMIN , admin ) ; parameters . put ( InputKeys . USER_ENABLED , enabled ) ; parameters . put ( InputKeys . NEW_ACCOUNT , newAccount ) ; parameters . put ( InputKeys . CAMPAIGN_CREATION_PRIVILEGE , campaignCreationPrivilege ) ; parameters . put ( InputKeys . FIRST_NAME , firstName ) ; parameters . put ( InputKeys . LAST_NAME , lastName ) ; parameters . put ( InputKeys . ORGANIZATION , organization ) ; parameters . put ( InputKeys . PERSONAL_ID , personalId ) ; parameters . put ( InputKeys . EMAIL_ADDRESS , emailAddress ) ; try { makeRequest ( new URL ( url . toString ( ) + RequestBuilder . getInstance ( ) . getApiUserUpdate ( ) ) , parameters , false ) ; } catch ( MalformedURLException e ) { throw new ApiException ( "The URL was incorrectly created." , e ) ; } catch ( IllegalArgumentException e ) { throw new ApiException ( "The response was not proper JSON." , e ) ; } }
Updates a user's information.
Updates a user ' s information .