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: update.rb
    path of file: ./repos/zammad/app/graphql/gql/mutations/user
    
    the code of the file until where you have to start completion: # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-founda
    
    def update(current_user, input)
      user_data = input.to_h

      set_core_workflow_information(user_data, ::User, 'edit')
      Service::User::FilterPermissionAssignments.new(current_user: current_user).execute(user_data: user_data)

      current_user.with_lock do
        current_user.update!(user_data)
      end

      current_user
    end