Skip to content

Commit

Permalink
update the auth_create_user to not have the full email as username
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Dec 12, 2024
1 parent 6ffee90 commit 457cfe2
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def sync_providers_id(user, github_id, orcid_id)

def auth_create_user(user_data)
user = User.new(user_data)
user.username = user.username.to_s.split('@').first || user.username
user.password = SecureRandom.hex(16)

return nil unless user.valid?
Expand Down

0 comments on commit 457cfe2

Please sign in to comment.