def password_required?
      if Devise.mappings[:user].modules.include?(:database_authenticatable)
        !persisted? || !password.nil? || !password_confirmation.nil?
      end
    end
def password_required?
      if Devise.mappings[:user].modules.include?(:database_authenticatable)
        !persisted? || !password.nil? || !password_confirmation.nil?
      end
    end
ユーザにパスワードが必要かどうかをチェックします。
 @return [Boolean]