Instead of creating a separate salt generator for each user, can't I just use their username as a salt? It would be unique for everyone, and achieves the purpose of the salts.
<?php
$hashedpass = sha1($username.$password)
>?
If the username is too short to be used as a salt, I can just add a global string to the username.
$salt =$username.'asdf1234'
$hashedpass = sha1($salt.$password)
Would this be sufficient for security? It still creates a unique salt for each user and prevents rainbow table attacks.