disable auto login after successful registration

1,174 views
Skip to first unread message

tachekent

unread,
Mar 4, 2011, 7:10:42 AM3/4/11
to Devise
Hello,
I have been looking far and wide across the internet but haven't been
able to find an answer for something that is probably quite simple.

I have overriden the registrations controller (now in users/
registration) because I want only authorized administrators to be able
to sign people up. No confirmation email are sent. As such, I don't
want to be automagically logged in as the new user each time I create
one.

Is there a simple way to override this behaviour?

many thanks (and thanks for such a fantastic gem)

Dorian

José Valim

unread,
Mar 4, 2011, 7:13:04 AM3/4/11
to Devise
The sign in happens here:

https://github.com/plataformatec/devise/blob/master/app/controllers/devise/registrations_controller.rb#L19

If you inherited this controller in your app, you just need to copy
the create action and change (remember to copy it from the same devise
version you are using). However, in general, I prefer to create a new
controller than changing registerable.
Reply all
Reply to author
Forward
0 new messages