Ruby on Rails
Thursday, September 14, 2017
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.
On Sep 14, 2017, at 7:25 AM, fugee ohu <fugee279@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-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/d634151a-6044-4b09-b770-8feacc4ab222%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment