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/errbit/app/controllers
    
    the code of the file until where you have to start completion: class UsersController < ApplicationController
  before_action :require_admin!, except: [:edit, :update]
  before_action :require_user_edit_priviledges, only: [:edit, :update]

  expose(:user)
  expose(:users) do
    User.order_by(name: :asc).page(params[:page]).per(current_user.per_page)
  end

  def index; end
  def new; end
  def show; end

  def create
    if user.save
      flash[:success] = "#{user.name} is now part of the
    
  def index; end
  def new; end
  def show; end

  def create
    if user.save
      flash[:success] = "#{user.name} is now part of the team. Be sure to add them as a project watcher."
      redirect_to user_path(user)
    else
      render :new
    end
  end

  def update
    if user.update(user_params)
      flash[:success] = I18n.t('controllers.users.flash.update.success', name: user.name)

      redirect_to user_path(user)
    else
      render :edit
    end
  end

  ##
  # Destroy the user pass in args
  #
  # @param [ String ] id the id of user we want delete
  #
  def destroy
    if user == current_user
      flash[:error] = I18n.t('controllers.users.flash.destroy.error')
    else
      UserDestroy.new(user).destroy
      flash[:success] = I18n.t('controllers.users.flash.destroy.success', name: user.name)
    end
    redirect_to users_path
  end