by Robert Brenstein.
Should you need to implement this in Moodle 1.9 after all, the following may help: MDL-12604 (option to prevent creation of new accounts even if user authenticates in external source -- a working implementation for pop and imap authentication).