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



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

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

#showObject

Display user profile



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

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