Title: Approval / Invitation / Access code? (wp-register.php)
Last modified: August 18, 2016

---

# Approval / Invitation / Access code? (wp-register.php)

 *  [narakalex](https://wordpress.org/support/users/narakalex/)
 * (@narakalex)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/approval-invitation-access-code-wp-registerphp/)
 * 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 isn’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…

Viewing 1 replies (of 1 total)

 *  Thread Starter [narakalex](https://wordpress.org/support/users/narakalex/)
 * (@narakalex)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/approval-invitation-access-code-wp-registerphp/#post-244986)
 * Posted in Wrong forum!
    Goto [http://wordpress.org/support/topic/41260#post-231770](http://wordpress.org/support/topic/41260#post-231770)
   if you know how to solve this question (Plugins and Hacks)!

Viewing 1 replies (of 1 total)

The topic ‘Approval / Invitation / Access code? (wp-register.php)’ is closed to 
new replies.

## Tags

 * [approval](https://wordpress.org/support/topic-tag/approval/)
 * [Invitation](https://wordpress.org/support/topic-tag/invitation/)
 * [register](https://wordpress.org/support/topic-tag/register/)

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 1 reply
 * 1 participant
 * Last reply from: [narakalex](https://wordpress.org/support/users/narakalex/)
 * Last activity: [20 years, 10 months ago](https://wordpress.org/support/topic/approval-invitation-access-code-wp-registerphp/#post-244986)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
