Difference between revisions of "Random Usernames and Passwords"
m |
Tmm vincent (talk | contribs) m (fixed categories) |
||
(16 intermediate revisions by 5 users not shown) | |||
Line 9: | Line 9: | ||
adding a hidden field to the [[NATS]] [[ct#Pre-Join Form|Pre-Join Form]] | adding a hidden field to the [[NATS]] [[ct#Pre-Join Form|Pre-Join Form]] | ||
[[ct#Template|template]]. The field's name must be | [[ct#Template|template]]. The field's name must be | ||
− | ''signup[random_userpass]''. The fields value should contain three | + | ''signup[random_userpass]''. The fields value should contain three to four |
parameters separated by colons. | parameters separated by colons. | ||
+ | |||
+ | On older NATS versions, you can only use this if you want both a random username and a random password generated for the member. On NATS versions 4.1.10.1 and above, if either username or password is blank on the join page submit and signup[random_userpass] was used, NATS will generate random values for the field that is blank. | ||
Line 40: | Line 42: | ||
| 10. Tries to generate a unique random username 10 times | | 10. Tries to generate a unique random username 10 times | ||
| 20 | | 20 | ||
+ | |- | ||
+ | | Username Prefix | ||
+ | | Append a prefix to the random username | ||
+ | | Any combination of #s and letters | ||
+ | | None (optional). A prefix is not required. | ||
+ | | abcd | ||
|} | |} | ||
+ | |||
+ | '''''Currently, the Username Prefix is used for both Username and Password''''' | ||
+ | |||
You should add the ''$errors.username'' variable to the join page so NATS can | You should add the ''$errors.username'' variable to the join page so NATS can | ||
display username errors. | display username errors. | ||
+ | |||
+ | '''Note:''' NATS may throw an error if the random username happens to be generated with a number as the first character, in this case we recommend adding a prefix character to the random string. | ||
+ | * Example: ''<input type="hidden" name="signup[random_userpass]" value="10:1:5:a">'' | ||
+ | <!--You can also now add a configuration variable in [[NATS4]] to generate usernames with a prefix. For example, you will now be able to generate random usernames with the prefix "a" and follow it with 15 random lowercase letters.--> | ||
== Examples == | == Examples == | ||
− | * 10 character username and password, lowercase, a maximum of 5 searches: value="10:1:5" | + | * 10 character username and password, lowercase, a maximum of 5 searches: ''<input type="hidden" name="signup[random_userpass]" value="10:1:5">'' |
− | * 8 character username and password, upper and lowercase, a maximum of 3 searches: value="8:0:3" | + | * 14 character username and password, lowercase, a maximum of 5 searches, with username and password prefix abcd: ''<input type="hidden" name="signup[random_userpass]" value="14:1:5:abcd">'' |
− | * 12 character username and password, upper and lowercase, a maximum of 10 searches: value="12" | + | * 8 character username and password, upper and lowercase, a maximum of 3 searches: ''<input type="hidden" name="signup[random_userpass]" value="8:0:3">'' |
+ | * 12 character username and password, upper and lowercase, a maximum of 10 searches: ''<input type="hidden" name="signup[random_userpass]" value="12">'' | ||
+ | [[Category:NATS3]] | ||
+ | [[Category:NATS4]] | ||
+ | [[Category:NATS4 Skins and Templates]] | ||
[[Category:Also NATS4 Article]] | [[Category:Also NATS4 Article]] |
Latest revision as of 22:57, 1 March 2018
NATS 3
|
---|
You can give members random usernames and passwords when they sign-up by adding a hidden field to the NATS Pre-Join Form template. The field's name must be signup[random_userpass]. The fields value should contain three to four parameters separated by colons.
On older NATS versions, you can only use this if you want both a random username and a random password generated for the member. On NATS versions 4.1.10.1 and above, if either username or password is blank on the join page submit and signup[random_userpass] was used, NATS will generate random values for the field that is blank.
Parameters
(Required parameters in bold)
Name | Description | Possible Values | Default Value | Example |
---|---|---|---|---|
Length | Number of characters in the username and password | Any whole number between 6 and 16 | None. You must specify a length | 16 |
Lowercase | Only use lowercase characters in the username and password | 0 or 1 (exclusive) | 0. Uses lowercase and uppercase characters | 1 |
Maximum Searches | How many times should NATS try to generate a unique random username before failing | Any whole number greater than zero | 10. Tries to generate a unique random username 10 times | 20 |
Username Prefix | Append a prefix to the random username | Any combination of #s and letters | None (optional). A prefix is not required. | abcd |
Currently, the Username Prefix is used for both Username and Password
You should add the $errors.username variable to the join page so NATS can
display username errors.
Note: NATS may throw an error if the random username happens to be generated with a number as the first character, in this case we recommend adding a prefix character to the random string.
- Example: <input type="hidden" name="signup[random_userpass]" value="10:1:5:a">
Examples
- 10 character username and password, lowercase, a maximum of 5 searches: <input type="hidden" name="signup[random_userpass]" value="10:1:5">
- 14 character username and password, lowercase, a maximum of 5 searches, with username and password prefix abcd: <input type="hidden" name="signup[random_userpass]" value="14:1:5:abcd">
- 8 character username and password, upper and lowercase, a maximum of 3 searches: <input type="hidden" name="signup[random_userpass]" value="8:0:3">
- 12 character username and password, upper and lowercase, a maximum of 10 searches: <input type="hidden" name="signup[random_userpass]" value="12">