Class: Hyrax::UsersController

Inherits:
ApplicationController
  • Object
show all
Includes:
Blacklight::SearchContext
Defined in:
app/controllers/hyrax/users_controller.rb

Direct Known Subclasses

Dashboard::ProfilesController

Instance Method Summary collapse

Instance Method Details

#indexObject


8
9
10
11
# File 'app/controllers/hyrax/users_controller.rb', line 8

def index
  authenticate_user! if Flipflop.hide_users_list?
  @users = search(params[:uq])
end

#showObject

Display user profile


14
15
16
17
18
# File 'app/controllers/hyrax/users_controller.rb', line 14

def show
  user = ::User.from_url_component(params[:id])
  return redirect_to root_path, alert: "User '#{params[:id]}' does not exist" if user.nil?
  @presenter = Hyrax::UserProfilePresenter.new(user, current_ability)
end