before_action :fetch_body
+ helper_method :current_user
+
def authorize_web
if session[:user]
self.current_user = User.where(:id => session[:user]).where("status IN ('active', 'confirmed', 'suspended')").first
end
def require_oauth
- @oauth = @user.access_token(OAUTH_KEY) if current_user && defined? OAUTH_KEY
+ @oauth = current_user.access_token(OAUTH_KEY) if current_user && defined? OAUTH_KEY
end
##