mirror of
https://github.com/heartcombo/devise.git
synced 2026-02-19 02:44:31 -05:00
Allow model config to override sign_in_after_change_password (#5825)
The config exists at the model/resource class from the registerable module, but it was not being honored, instead we were directly relying on the main Devise config. Now this can be configured and honored per-model/resource class, as expected. This is similar to #5429 and `sign_in_after_reset_password` fix.
This commit is contained in:
committed by
GitHub
parent
e5ffdc4248
commit
bb2b4ecc1b
@@ -163,6 +163,6 @@ class Devise::RegistrationsController < DeviseController
|
||||
def sign_in_after_change_password?
|
||||
return true if account_update_params[:password].blank?
|
||||
|
||||
Devise.sign_in_after_change_password
|
||||
resource_class.sign_in_after_change_password
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user