$wgGroupPermissions['*']['createaccount'] = false;
Please let me know here if you have any questions.