Any form of auto-generated user name based upon the user's full name is going to have problems, because you can't anticipate what the edge cases are that cause the algorithm to blindly come up with something offensive or otherwise unusable. For instance, "Root" is a perfectly good last name, so you need to be able to tweak the algorithm in the last-name-only case.
True story: back when Usenet news was the "killer app" on the Internet, a young woman enrolled at a university which used the algorithm "first six letters of last name followed by first and middle initials" to assign usernames. Her name: Mary E. Cummings. (Or perhaps without the 'g'; it's been a while. I leave her actual username as an exercise for the reader, as some may find it offensive if I were to just spell it out.)