Approval / Invitation / Access code? (wp-register.php)
-
When people click on “register” there is only 2 options..
enter username:
enter email:how can i add a simple 3 option? like “invitation” code?
I’d like only my friends & relatives to be able to register and make comments to my blog.
I’d like to be able to give out 1 or 2 invitation codes (like for example: “wordpressrules” or “wp2005”).
So when people click “register” is will ask for 3 things
enter username:
enter email:
enter invitationcode:How to come about this?
***** This is my attempt to make it in wp-register.php*****
case ‘register’:$user_login = $_POST[‘user_login’];
$user_email = $_POST[‘user_email’];
$invitationcode = $_POST[‘invitationcode’];/* checking that username has been typed */
if ($user_login == ”) {
die (__(‘ERROR: Please enter a username.’));
}/* checking e-mail address */
if ($user_email == ”) {
die (__(‘ERROR: Please type your e-mail address.’));
} else if (!is_email($user_email)) {
die (__(‘ERROR: The email address isna€?t correct.’));
}
if ($invitationcode,’wp2005′) != ‘wp2005’)
die (__(‘
# You must enter your invitationcode in the last box (below email)’));*****
PS. I don’t know how to code in php.. i can barely make a system-out-print with hello world…
- The topic ‘Approval / Invitation / Access code? (wp-register.php)’ is closed to new replies.