Difference between revisions of "Allow users to register"

From Dreamwidth Notes
Jump to: navigation, search
(needs updates)
(location of config files.)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Update|text=This should now be changed to an article about the invite system.}}
+
As the code currently stands, you can either enable or disable [[Invite code generation | invite codes]] in your installation. This is done in etc/config.pl:
  
In order to allow users to register, you will have to edit this file:
+
$USE_ACCT_CODES = 1;
  
vi htdocs/create.bml
+
By default, this is set to enabled in a new installation. If you're developing, you may wish to set this to 0. This will allow anyone to create an account without having an invite code.
  
Look for this line:
+
To create and distribute invite codes (so you can make accounts while $USE_ACCT_CODES is on), log in as the system user. Go to the Admin Console ($SITEROOT/admin/console) and type:
  
  return "<?h1 Sorry! h1?><?p This site is not yet open for business.  :-) p?>";
+
  make_invites <username> <count> <reason>
  
And put a # in front of it:
+
For instance:
  
  #return "<?h1 Sorry! h1?><?p This site is not yet open for business. :-) p?>";
+
  make_invites system 1 "to create my hacking account"
  
Save and quit (:wq) and your installation should now allow user creation.
+
Your invite codes will print out on the success page. They will also show up at $SITEROOT/manage/circle/invite.bml (where they can be emailed if you'd like).
  
Currently there is no default TOS for the mini-TOS section.  You can avoid that showing up by either creating a TOS or by setting this variable in etc/ljconfig.pl:
+
If you want accounts other than the [[system account]] to be able to use the make_invites console command, you'll need to grant the "payments" [[Privileges|priv]] to anyone whom you want to have that ability.
  
$TOS_CHECK = 1;    # require users to agree to TOS
+
Or, you can create a 'promo' invite code. Make sure you have the "payments" [[Privileges|priv]], then go to $SITEROOT/admin/invites/promo and click 'Create new'. If you do it that way, you'll only have to remember the name of the promo code you set and enter that for account creation.
  
To:
+
=== Notes on config files ===
  
$TOS_CHECK = 0;    # require users to agree to TOS
+
There are many possible locations for config files. The quick and dirty method is to edit the ones in $LJHOME/etc/. The better method is to copy them to $LJHOME/ext/local/etc/ and edit them there. It helps if you know which one you're editing.
  
 
[[Category: Dreamwidth Installation]]
 
[[Category: Dreamwidth Installation]]
 +
[[Category: Administration]]

Latest revision as of 12:20, 14 May 2016

As the code currently stands, you can either enable or disable invite codes in your installation. This is done in etc/config.pl:

$USE_ACCT_CODES = 1;

By default, this is set to enabled in a new installation. If you're developing, you may wish to set this to 0. This will allow anyone to create an account without having an invite code.

To create and distribute invite codes (so you can make accounts while $USE_ACCT_CODES is on), log in as the system user. Go to the Admin Console ($SITEROOT/admin/console) and type:

make_invites <username> <count> <reason>

For instance:

make_invites system 1 "to create my hacking account"

Your invite codes will print out on the success page. They will also show up at $SITEROOT/manage/circle/invite.bml (where they can be emailed if you'd like).

If you want accounts other than the system account to be able to use the make_invites console command, you'll need to grant the "payments" priv to anyone whom you want to have that ability.

Or, you can create a 'promo' invite code. Make sure you have the "payments" priv, then go to $SITEROOT/admin/invites/promo and click 'Create new'. If you do it that way, you'll only have to remember the name of the promo code you set and enter that for account creation.

Notes on config files

There are many possible locations for config files. The quick and dirty method is to edit the ones in $LJHOME/etc/. The better method is to copy them to $LJHOME/ext/local/etc/ and edit them there. It helps if you know which one you're editing.