lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt in authentication-zero-2.11.2 vs lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt in authentication-zero-2.12.0

- old
+ new

@@ -4,12 +4,12 @@ def create session = Current.session <%- if omniauthable? -%> - if session.<%= singular_table_name %>.authenticate(params[:password]) || session.<%= singular_table_name %>.provider + if session.user.authenticate(params[:password]) || session.user.provider <%- else -%> - if session.<%= singular_table_name %>.authenticate(params[:password]) + if session.user.authenticate(params[:password]) <%- end -%> session.sudo.mark; redirect_to(params[:proceed_to_url]) else redirect_to new_sessions_sudo_path(proceed_to_url: params[:proceed_to_url]), alert: "The password you entered is incorrect" end