function regcode_errormsg in Registration codes 6.2
Same name and namespace in other branches
- 8 regcode.module \regcode_errormsg()
- 7.2 regcode.module \regcode_errormsg()
- 7 regcode.module \regcode_errormsg()
Return text message requested by given identifier/constant
Parameters
$code The error message code:
Return value
The text of the message.
1 call to regcode_errormsg()
- regcode_user in ./
regcode.module - Implementation of hook_user().
File
- ./
regcode.module, line 285
Code
function regcode_errormsg($err) {
$messages = array(
REGCODE_VALIDITY_NOTEXISTING => t('Registration code does not exist'),
REGCODE_VALIDITY_NOTAVAILABLE => t('Registration code is not available'),
REGCODE_VALIDITY_TAKEN => t('Registration code has already been used'),
REGCODE_VALIDITY_EXPIRED => t('Registration code has expired'),
);
$msg = FALSE;
if (isset($messages[$err])) {
$msg = $messages[$err];
}
return $msg;
}