FIX: Sites with SSO that required approval were not creating reviewables

This commit is contained in:
Robin Ward
2019-04-10 12:53:30 -04:00
parent eae22548de
commit cab83596ec
2 changed files with 28 additions and 0 deletions

View File

@@ -84,6 +84,9 @@ class DiscourseSingleSignOn < SingleSignOn
user.user_avatar.save! if user.user_avatar
user.save!
# The user might require approval
user.create_reviewable
if bio && (user.user_profile.bio_raw.blank? || SiteSetting.sso_overrides_bio)
user.user_profile.bio_raw = bio
user.user_profile.save!