If all generated usernames using an integer range are already consumed by existing users, the loop stuck in an infinite loop. Fixed by using a for loop instead of while with an upper limit.
If all generated usernames using an integer range are already consumed by existing users, the loop stuck in an infinite loop. Fixed by using a for loop instead of while with an upper limit.