strip whitespace from email on bulk import

This commit is contained in:
Kiara Grouwstra 2023-02-18 23:08:12 +01:00
parent 2db4d18bd3
commit 3a0dbb3e98
Signed by: kiara
GPG Key ID: 47D3B7604FFCA83A
1 changed files with 1 additions and 0 deletions

View File

@ -172,6 +172,7 @@ class UsersController < ApplicationController
users = CSV.parse(users_csv, :headers => true).each do |row|
fields = defaults.merge(row.to_hash)
fields[:room_id] = room_id
fields['email'] = fields['email'].strip
User.create!(fields)
end