You are here

function regcode_message in Registration codes 5.3

Same name and namespace in other branches
  1. 6 regcode.api.php \regcode_message()

Return text message requested by given identifier/constant

Parameters

$id1: The primary section-identifier (string) for the message

$id2: The secondary sub-identifier (constant) for the message

Return value

The text of the message.

1 call to regcode_message()
regcode_user in ./regcode.module
Act on user account actions.

File

./regcode_api.inc.php, line 28
regcode_api.inc.php contains general low-level functions for the registration-code module, for tasks like

Code

function regcode_message($id1, $id2 = NULL) {
  switch ($id1) {
    case 'VALIDITY_ERROR':
      switch ($id2) {
        case REGCODE_VALIDITY_NOTEXISTING:
          return 'This registration code does not exist.';
        case REGCODE_VALIDITY_NOTAVAILABLE:
          return 'This registration code is not available.';
        case REGCODE_VALIDITY_TAKEN:
          return 'This registration code has already been used.';
        case REGCODE_VALIDITY_EXPIRED:
          return 'This registration code has expired.';
      }
  }
}