lundi 19 octobre 2015

Bypass Devise Confirmable for certain set of users

I am using devise with Rails 3. Admin account can Access the User account from a user listing page. The Access functionality is an Impersonation where the Admin Logs into the User account without password or email provided.

sign_in @user, :bypass => true 

This works fine, but can I do the same functionality if the user email is not confirmed as i have enabled the :confirmable module. Is it possible that I can bypass the email_confirmed checking only for the admins while impersonating?

Aucun commentaire:

Enregistrer un commentaire