Merge branch 'rails' into kefir

This commit is contained in:
f 2019-04-22 16:15:02 -03:00
commit e894af7c83
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D
2 changed files with 8 additions and 8 deletions

View file

@ -19,9 +19,10 @@ module Warden
# Autentica a una posible invitadx, no fallamos para que haya
# fallback con IMAP
def authenticate!
u = Invitadx.find_by_email(params['username'])
u = ::Invitadx.find_by_email(params['username'])
return unless u.try(:authenticate, params['password'])
if u.try(:authenticate, params['password'])
if u.confirmed?
success! u
else
@ -31,4 +32,3 @@ module Warden
end
end
end
end

View file

@ -46,7 +46,7 @@ module Warden
@imap.login(@email.normal, params['password'])
@imap.disconnect
success! Usuaria.find(@email.normal)
success! ::Usuaria.find(@email.normal)
rescue Net::IMAP::NoResponseError, EOFError => e
@imap.disconnect
Rails.logger.error e.to_s