Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - Gemfile - Gemfile.lock - app/controllers/about_controller.rb - app/controllers/auth/sessions_controller.rb
This commit is contained in:
@@ -169,7 +169,7 @@ class User < ApplicationRecord
|
||||
end
|
||||
|
||||
def functional?
|
||||
confirmed? && approved? && !disabled? && !account.suspended?
|
||||
confirmed? && approved? && !disabled? && !account.suspended? && account.moved_to_account_id.nil?
|
||||
end
|
||||
|
||||
def unconfirmed_or_pending?
|
||||
@@ -265,17 +265,20 @@ class User < ApplicationRecord
|
||||
end
|
||||
|
||||
def password_required?
|
||||
return false if Devise.pam_authentication || Devise.ldap_authentication
|
||||
return false if external?
|
||||
|
||||
super
|
||||
end
|
||||
|
||||
def send_reset_password_instructions
|
||||
return false if encrypted_password.blank? && (Devise.pam_authentication || Devise.ldap_authentication)
|
||||
return false if encrypted_password.blank?
|
||||
|
||||
super
|
||||
end
|
||||
|
||||
def reset_password!(new_password, new_password_confirmation)
|
||||
return false if encrypted_password.blank? && (Devise.pam_authentication || Devise.ldap_authentication)
|
||||
return false if encrypted_password.blank?
|
||||
|
||||
super
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user