Skip to content

Commit fe8e38b

Browse files
committed
Disable weak words for user password for now
Auto-building the person was causing issues with registration race conditions
1 parent 084fcc6 commit fe8e38b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

app/models/better_together/user.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def build_person(attributes = {})
4242
# Define person_attributes method to get attributes of associated Person
4343
def person
4444
# Check if a Person object exists and return its attributes
45-
super.present? ? super : build_person
45+
super.present? ? super : build_person # this build_person call can cause issues in registration
4646
end
4747

4848
# def person= arg
@@ -68,10 +68,11 @@ def to_s
6868
email
6969
end
7070

71-
def weak_words
72-
return unless person
71+
# TODO: accessing person here was causing save issues in the registration process due the the autobuild
72+
# def weak_words
73+
# return [] unless person
7374

74-
[person.name, person.slug, person.identifier]
75-
end
75+
# [person.name, person.slug, person.identifier]
76+
# end
7677
end
7778
end

0 commit comments

Comments
 (0)