diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-10-30 15:47:05 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-10-30 15:49:43 +0000 |
commit | 5715cc4628f9ebd99448f85fdf3e2c191d3d2875 (patch) | |
tree | 3ff0f8faeb3b07099d258937188f7fe29ab9ffc6 /app/controllers/user_controller.rb | |
parent | 081d912ee868843c5b73b201761b1d8d19239e34 (diff) |
If we're doing admin authentication internally, don't bother with the request environment, set the admin_name on the session instead.
Diffstat (limited to 'app/controllers/user_controller.rb')
-rw-r--r-- | app/controllers/user_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 810b3321e..4ee527bae 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -119,13 +119,13 @@ class UserController < ApplicationController @track_things = TrackThing.find(:all, :conditions => ["tracking_user_id = ? and track_medium = ?", @display_user.id, 'email_daily'], :order => 'created_at desc') for track_thing in @track_things # XXX factor out of track_mailer.rb - xapian_object = InfoRequest.full_search([InfoRequestEvent], track_thing.track_query, 'described_at', true, nil, 20, 1) + xapian_object = InfoRequest.full_search([InfoRequestEvent], track_thing.track_query, 'described_at', true, nil, 20, 1) feed_results += xapian_object.results.map {|x| x[:model]} end end @feed_results = Array(feed_results).sort {|x,y| y.created_at <=> x.created_at}.first(20) - + respond_to do |format| format.html { @has_json = true } format.json { render :json => @display_user.json_for_api } @@ -244,6 +244,7 @@ class UserController < ApplicationController session[:user_circumstance] = nil session[:remember_me] = false session[:using_admin] = nil + session[:admin_name] = nil end def signout self._do_signout |