I am trying to understand about how setting variables works in install profiles. As an example, how would I set the option to enable people to create a website for the account in the install profile? Here is the page on variable_set https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/variable_set but how do I retrieve the value.
Variables in install profiles work no differently to variables in a 'normal' bootstrap.
To set a variable use
To retrieve it, use
$var = variable_get('var_name', 'default');
To find the names of variables, the easiest method is to install the Devel module and visit the variable editor at /devel/variable
Users can register at your Drupal 7 site by default but you have to disable that. If you want to do this, just put following in your profile.install file:
// Only administrators can create user accounts. variable_set('user_register', USER_REGISTER_ADMINISTRATORS_ONLY);
It would make sense to copy the standard installation profile to have a good base and then you just could add these two lines from above :)