diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 75ee3edf..b720de0a 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1279,9 +1279,9 @@ end @partner = Partner.where(:id => params[:partner]).first @members = if params[:search] - User.where("LOWER(concat(lastname, firstname, nickname, mail)) LIKE '%#{params[:search]}%'") + User.where("LOWER(concat(lastname, firstname, nickname, mail)) LIKE '%#{params[:search]}%' AND partner_id is NULL") else - User.where(:certification => 1) + User.where(:certification => 1, :partner_id => nil ) end @members = paginateHelper @members, 8 respond_to do |format|