You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: users_controller.rb
    path of file: ./repos/brimir/app/controllers
    
    the code of the file until where you have to start completion: # Brimir is a helpdesk system to handle email support requests.
# Copyright (C) 2012-2016 Ivaldi http
    
  def update
    @user = User.find(params[:id])

    # if no password was posted, remove from params
    if params[:user][:password] == ''
      params[:user].delete(:password)
      params[:user].delete(:password_confirmation)
    end