Thanks for that. I already have the 'multiple instance of same user' thing sorted.
Because the accounts rely on a unix username, i run the adduser command before making any other mod's, and if it returned that the user already exists, then i break from the code and send the user an e-mail to tell them that the account is taken.