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/human-essentials/app/controllers
    
    the code of the file until where you have to start completion: # Provides scope-limited access to viewing the data of other users
class UsersController < ApplicationController
  def index
    @users = current_organization.users
  end

  def new
    @user = User.new
  end

  def switch_to_role
    role = Role.find(params[:role_id])
    unless current_user.roles.include?(role)
      error_messag
    
  def partner_user_reset_password
    partner = current_organization.partners.find_by(id: params[:partner_id])
    if partner.nil?
      redirect_back(fallback_location: root_path,
        alert: "Could not find partner, or you do not have access to this partner!")
      return
    end

    user = User.with_role(:partner, partner)
      .where("LOWER(email) = ?", params[:email].downcase)
      .first
    if user.nil?
      redirect_back(fallback_location: root_path,
        alert: "Could not find partner user for this partner with email #{params[:email]}!")
      return
    end