A person searching for a way to ensure unique data came across this post which I made for a client a couple of years ago.
Within 20 minutes, that new client had paypal’d me a couple of beers, I had installed the modification, tested it and tweaked it a little ready for him to use. And this is something that he had been trying to find for over 6 months!
Developers; that is the exact point of keeping every single piece of code you ever write. If someone comes to you in the future you can dig it out and re-use.