Difference between revisions of "Random Usernames and Passwords"

From TMM Wiki
Jump to navigationJump to search
m
Line 39: Line 39:
 
| 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
 
|}
 
|}
  
Line 44: Line 50:
 
display username errors.
 
display username errors.
  
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.  
+
'''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: ''signup[random_userpass]="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: ''signup[random_userpass]="10:1:5"''
 
* 10 character username and password, lowercase, a maximum of 5 searches: ''signup[random_userpass]="10:1:5"''
 +
* 14 character username and password, lowercase, a maximum of 5 searches, with username prefix abcd: ''signup[random_userpass]="14:1:5:abcd"''
 
* 8 character username and password, upper and lowercase, a maximum of 3 searches: ''signup[random_userpass]="8:0:3"''
 
* 8 character username and password, upper and lowercase, a maximum of 3 searches: ''signup[random_userpass]="8:0:3"''
 
* 12 character username and password, upper and lowercase, a maximum of 10 searches: ''signup[random_userpass]="12"''
 
* 12 character username and password, upper and lowercase, a maximum of 10 searches: ''signup[random_userpass]="12"''

Revision as of 16:59, 12 August 2011

NATS 4
Members Admin
The Members Admin
View Member Details
Add Member
MySQL Auth
Mod Authn DB
Multisite Access
Member Logging
Member Password Retrieval
OpenID Connect
Mod Auth OpenIDC
ID Numbers
Skins and Templates Admin
The Skins and Templates Admin
Skins
Templates
Site Templates
Language Skins
Language Files
custom_errors.php
Join Page Variables
Skipping NATS Join Form
Post URL Variables
Member Usernames & Passwords
Form Validation
Username Recommendations
Password Retrieval
Post-Biller Templates
Geo-Target Join Options
Random Usernames and Passwords
Smarty
Smarty print array
Smarty Plugins
Available Smarty Functions
Affiliate Support Template
Adding a Verification Image
Custom Program and Campaign Selection Pages
Output An Affiliate's Last Paid Date
Affiliate Signup Email
Affiliate Join Page Linkcodes
Approval/Upgrade/Denial Variables
Approval/Upgrade/Denial Template Variables
CSS Theme Builder
NATS 3
Skins & Templates Admin
Smarty Plugins
Skins
Editing Skins
Creating Skins
Switching Skins
Templates
nats_code
Affiliate Stats Template
Affiliate Support Template
Affiliate Login Template
custom errors.php
Template Array Variable
Detailed Stats
NATS Variables
Dialer Statistics
Affiliate Signup
Post URL Variables
Member Usernames & Passwords
Output An Affiliate's Last Paid Date
Custom Program and Campaign Selection Pages
CAPTCHA Removal
Username Recommendations
Password Retrieval
Post-Biller Templates
Geo-Target Join Options
Template Caching
Random Usernames and Passwords
Base Templates
Protecting Template Data
Mail Reseller Signup Template Variable Names
Smarty
Smarty print array
News Section Templating
Affiliate Signup Email
Getting The NATSCode
Checking for Usernames on All Sites
Adding Stats to Affiliate Pages
Affiliate Join Page Linkcodes

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 parameters separated by colons.

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

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: signup[random_userpass]="10:1:5:a"

Examples

  • 10 character username and password, lowercase, a maximum of 5 searches: signup[random_userpass]="10:1:5"
  • 14 character username and password, lowercase, a maximum of 5 searches, with username prefix abcd: signup[random_userpass]="14:1:5:abcd"
  • 8 character username and password, upper and lowercase, a maximum of 3 searches: signup[random_userpass]="8:0:3"
  • 12 character username and password, upper and lowercase, a maximum of 10 searches: signup[random_userpass]="12"