def user_update_name_funcs(request):
	# first find the user we're trying to edit
	user_or_error = try_to_get_user(request.GET)
	if not isinstance(user_or_error, get_user_model()):
		return user_or_error
	else:
		user = user_or_error
	# now check that we have permission to edit users & that we're editing our own account, or that we're a staff member
	possible_error_one = check_user_access(request.user, 'change_user')
	possible_error_two = check_self_only(request.user, user)
	if possible_error_one or possible_error_two:
		return possible_error_one or possible_error_two
	# handle the email update here
	return HttpResponse('ok')
def user_update_email(request):
	user = try_to_get_user(request.GET)
	check_user_access(request.user, 'change_user')
	check_self_only(request.user, user)
	# handle the email update here
	return HttpResponse('ok')