DEV Community

wusher
wusher

Posted on • Originally published at wusher.github.io on

1

Signout Users

Code to logout deactivated users:

if current_user&.deactivated_at
  email = current_user.email
  sign_out current_user
  redirect_to root_path, alert: "Your account has been deactivated. Account: #{email} "
end

Enter fullscreen mode Exit fullscreen mode

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More