= Controlling account creation =
BOINC has two mechanisms for creating accounts:
* RPC-based: The [WebRpc#create_account create_account] RPC.
This is used by BOINC Manager and by account managers.
* Web-based: the user fills out a web form (join.php or create_account_form.php).
This has the advantages that you can use ReCaptcha (to prevent mass account creation by spammers)
and you can customize it however you want.
By default both mechanisms are enabled.
== Disabling account creation == #disabling-account-creation
To disable all account creation, edit [ProjectOptions config.xml] and add
{{{
1
}}}
Note: 1 = True, 0 = False
To disable RPC-based account creation, add
{{{
1
}}}
== Restricting account creation via 'invitation codes' == #invite-codes
You can restrict account creation to those who present an 'invitation code'.
To do so, add to the file `html/project/project.inc` a definition for a PHP constant `INVITE_CODES`
as a [http://php.net/reference.pcre.pattern.syntax Perl-Compatible Regular Expression (PCRE)]
for the set of invitation codes.
For example:
{{{
define('INVITE_CODES', '/yohoho|blunderbuss|!grog4U/');
}}}
This allows someone to create an account if they enter any of the words 'yohoho', 'blunderbuss', or '!grog4U'.
INVITE_CODES applies to both web and RPC-based account creation.
To restrict only RPC-based account creation, use
{{{
define('INVITE_CODES_RPC', '/yohoho|blunderbuss|!grog4U/');
}}}