Editing user submission of user registration form with hook_user_insert() and $edit
hook_user_insert() is invoked after the user object and all it's fields have already been committed to the database; that's why your code isn't taking effect at the moment.

There are a couple of ways you could go:


Use exactly the same logic in hook_user_presave(), which gets called before the data is committed to the database.
Implement hook_form_alter() for the registration form, add a custom validation function, and manipulate the field values in there.