Skip to content

Commit

Permalink
Truncate username upon sign in, to match validation (#691)
Browse files Browse the repository at this point in the history
  • Loading branch information
pil0u authored Nov 20, 2024
1 parent 6ccfb5e commit 6098f65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def self.from_kitt(auth)
original_city = City.find_or_initialize_by(name: original_batch&.city&.name)

user = find_or_initialize_by(provider: auth.provider, uid: auth.uid) do |u|
u.username = auth.info.github_nickname
u.username = auth.info.github_nickname[0...16]
u.batch = Batch.find_or_initialize_by(number: original_batch&.camp&.slug.to_i)
u.city = original_city
end
Expand Down

0 comments on commit 6098f65

Please sign in to comment.