def authorize_web
if session[:user]
- @user = User.find(session[:user], :conditions => {:status => ["active", "confirmed", "suspended"]})
+ @user = User.where(:status => ["active", "confirmed", "suspended"]).find(session[:user])
if @user.status == "suspended"
session.delete(:user)
if params[:referer]
redirect_to :controller => "user", :action => "terms", :referer => params[:referer]
else
- redirect_to :controller => "user", :action => "terms", :referer => request.request_uri
+ redirect_to :controller => "user", :action => "terms", :referer => request.fullpath
end
end
elsif session[:token]
end
def require_user
- redirect_to :controller => 'user', :action => 'login', :referer => request.request_uri unless @user
+ redirect_to :controller => 'user', :action => 'login', :referer => request.fullpath unless @user
end
##