function invite_regcode in Invite 5
Creates a unique tracking code.
Return value
An 8-digit long, unique tracking code.
1 call to invite_regcode()
- invite_form_submit in ./
invite.module - Forms API callback; processes the incoming form data.
File
- ./
invite.module, line 970 - Allows your users to send and track invitations to join your site.
Code
function invite_regcode() {
do {
$reg_code = user_password(8);
$result = db_query("SELECT COUNT(*) FROM {invite} WHERE reg_code = '%s'", $reg_code);
} while (db_result($result));
return $reg_code;
}