lib/challah/techniques/api_key_technique.rb in challah-0.7.0.pre2 vs lib/challah/techniques/api_key_technique.rb in challah-0.7.0

- old
+ new

@@ -9,10 +9,10 @@ # Api key functionality is only enabled with the :api_key_enabled option. This is turned # off by default and must be manually enabled for security reasons. return nil unless Challah.options[:api_key_enabled] unless @key.to_s.blank? - user = Challah.user_model.find_by_api_key(@key) + user = ::User.find_by_api_key(@key) if user and user.active? return user end end \ No newline at end of file