Redeclaring the `err` variable inside the if statement made the later error check fail even when the user was successfully created. Fixes: #1277
Redeclaring the `err` variable inside the if statement made the later error check fail even when the user was successfully created. Fixes: #1277