You can do it from the rails console. It’s more complicated than can be explained here, especially since emails addresses are no longer in the user record. If you have a budget you can post in Marketplace or contact me directly.
Or but you don’t care about the actual email address…
Something like
users = User.where ('username like'%@%''")
Then you’d loop through and use gsub to strip everything from the @ to the end. That’s the best I can do on my phone.