Search code examples
ruby-on-railsauthlogicauthlogic-oid

force user to register


Is it possible to require a "logged in" user to complete registration before he can continue on? This scenario happens when a user logges in via facebook or some other oauth/open id provider and the session does not provide all the requires registation data.

Here is my application controller and I am tryint this require_registration method but it somehow ends up in an infinite loop not sure what's going on.

http://pastie.org/1185477


Solution

  • You need to prevent the before_filter from running on the UsersController#edit action which the before_filter redirects to.

    class UsersController
      skip_before_filter :require_registration, :only => :edit
    
      # ...
    end