disabling user accounts

Does devise provide an already built in method for disabling user accounts so I can disable accounts without any additional coding

Not built in, but you could easily write your own method to prevent an account from logging in. Simply throw a Boolean of active: true/false and write a method to activate/deactivate the account. Then in your application controller have a method that checks the status of an account and if it does not meet the active true state then force it to logout and send a flash message “Your account has been disabled”. If you google, there a lot of examples on this.

Not built in, but you could easily write your own method to prevent an account from logging in. Simply throw a Boolean of active: true/false and write a method to activate/deactivate the account. Then in your application controller have a method that checks the status of an account and if it does not meet the active true state then force it to logout and send a flash message “Your account has been disabled”. If you google, there a lot of examples on this.

Does devise provide an already built in method for disabling user accounts so I can disable accounts without any additional coding

You received this message because you are subscribed to the Google Groups “Ruby on Rails: Talk” group.

To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.

To post to this group, send email to rubyonra...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d634151a-6044-4b09-b770-8feacc4ab222%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Force it to log out with redirect to ?

Force it to logout with the standard devise logout method.

Read the documentation for :lockable

That said, how exactly do you intend to "disable accounts"? From
a console, through a form? You will have to do *some* coding to
accomodate whatever approach(es) you choose.

LOL, I just read the original message. ‘without any additional coding’ seems to indicate the OP probably should not be using rails, with it being an application framework rather than a drag and drop site builder.

Saying that you could probably lock the account perminately with some cleaver setup and a bit of SQL, which is almost not coding.

If you enabled the :lockable feature, all you'd have to do would be
to "log in" with a bad password N times (whatever you've config'd)
and boom, user locked out.

I'd personally prefer to write a simple admin method, but...