mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FIX: Associated Instagram account was missing at some places
This commit is contained in:
parent
7ae1c5a663
commit
fffd1a6602
4 changed files with 8 additions and 2 deletions
|
@ -61,6 +61,7 @@ class User < ActiveRecord::Base
|
|||
has_one :github_user_info, dependent: :destroy
|
||||
has_one :google_user_info, dependent: :destroy
|
||||
has_one :oauth2_user_info, dependent: :destroy
|
||||
has_one :instagram_user_info, dependent: :destroy
|
||||
has_one :user_second_factor, dependent: :destroy
|
||||
has_one :user_stat, dependent: :destroy
|
||||
has_one :user_profile, dependent: :destroy, inverse_of: :user
|
||||
|
@ -887,7 +888,8 @@ class User < ActiveRecord::Base
|
|||
result << "Twitter(#{twitter_user_info.screen_name})" if twitter_user_info
|
||||
result << "Facebook(#{facebook_user_info.username})" if facebook_user_info
|
||||
result << "Google(#{google_user_info.email})" if google_user_info
|
||||
result << "Github(#{github_user_info.screen_name})" if github_user_info
|
||||
result << "GitHub(#{github_user_info.screen_name})" if github_user_info
|
||||
result << "Instagram(#{instagram_user_info.screen_name})" if instagram_user_info
|
||||
result << "#{oauth2_user_info.provider}(#{oauth2_user_info.email})" if oauth2_user_info
|
||||
|
||||
user_open_ids.each do |oid|
|
||||
|
|
|
@ -45,6 +45,7 @@ class UserAnonymizer
|
|||
@user.facebook_user_info.try(:destroy)
|
||||
@user.single_sign_on_record.try(:destroy)
|
||||
@user.oauth2_user_info.try(:destroy)
|
||||
@user.instagram_user_info.try(:destroy)
|
||||
@user.user_open_ids.find_each { |x| x.destroy }
|
||||
@user.api_key.try(:destroy)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue