Ruby on Rails
Thursday, September 14, 2017
On Thursday, September 14, 2017 at 8:48:35 AM UTC-4, nynhex wrote:
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.Force it to log out with redirect to <action> ?On Sep 14, 2017, at 7:25 AM, fugee ohu <fuge...@gmail.com> wrote: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 .
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-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a43dda81-1cf6-4ca5-be56-77bd87d5e1a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment