Fix “invited by” not showing up for invited accounts in admin interface (#10791)
This commit is contained in:
@ -114,6 +114,10 @@ class User < ApplicationRecord
|
||||
end
|
||||
|
||||
def invited?
|
||||
invite_id.present?
|
||||
end
|
||||
|
||||
def valid_invitation?
|
||||
invite_id.present? && invite.valid_for_use?
|
||||
end
|
||||
|
||||
@ -274,7 +278,7 @@ class User < ApplicationRecord
|
||||
private
|
||||
|
||||
def set_approved
|
||||
self.approved = open_registrations? || invited? || external?
|
||||
self.approved = open_registrations? || valid_invitation? || external?
|
||||
end
|
||||
|
||||
def open_registrations?
|
||||
|
Reference in New Issue
Block a user