Tony
Tony

Reputation: 10208

Devise authentication using custom SessionsController

I am overriding sessionscontroller because I need a special behavior.

When the user signs up, he will be inactive and won't be able to login. I want to add that login to the login process.

The user will become active after an administrator authorizes him, changing one field in the CMS. How can I manage the login process so it doesnt allow inactive users to login?

Upvotes: 0

Views: 194

Answers (1)

Rishav Rastogi
Rishav Rastogi

Reputation: 15492

You can simply add a "active" column to your user table and devise does the magic for you :).

Take a look at the link below to see how it works:

http://pivotallabs.com/users/carl/blog/articles/1619-standup-3-21-2011-deactivating-users-in-devise

Upvotes: 1

Related Questions