$wgGroupPermissions['*']['createaccount'] = false;
Don't forget to sign up and help contribute to the website!
JavaScript is required to use the API sandbox.