function checkeditusername() {
	var username=$('#edituser input[name=user]').val();
	var rusername=$('#edituser input[name=ruser]').val();
	var password=$('#edituser input[name=password]').val();
		if(username=="" || password=="") {
			toastr.error('You must enter a username and a password');
				if(password=="") {
					edituser.password.focus();
				}
				if(username=="") {
					edituser.user.focus();
				}
		} else if(alphanumeric(username)==false || alphanumeric(password)==false) {
			if(alphanumeric(username)==false) {
				toastr.error('Username contains invalid characters');
				newuser.user.focus();
			} else if(alphanumeric(password)==false) {
				toastr.error('Password contains invalid characters');
				newuser.password.focus();
			}
		} else {
			if(username!=rusername) {
				jQuery.ajax({
					type: 'post',
					url: 'functions/ajaxhelper.php',
					data: 'function=1&username='+username,
					cache: false,
					success: function(response) {
						if(response==1) {
							toastr.error('Username already exists');
							edituser.user.focus();
						} else {
							$('#edituser').trigger('submit', true);
						}
					}
				});
			} else {
				$('#edituser').trigger('submit', true);
			}
		}
}
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.