| | 160 | /* defin error codes */ |
| | 161 | define ('ERR_UNKNOWN_USERNAME', 20001); |
| | 162 | define ('ERR_WRONG_PASSWORD', 20002); |
| | 163 | define ('ERR_NO_USERNAME', 20003); |
| | 164 | define ('ERR_VALIDATION_EXPIRED', 20004); |
| | 165 | define ('ERR_ACCOUNT_INVALID', 20005); |
| | 166 | |
| | 167 | function getErrorText($errorCode) { |
| | 168 | switch ($errorCode) { |
| | 169 | case ERR_UNKNOWN_USERNAME: $text = _('Unknown username or email'); break; |
| | 170 | case ERR_WRONG_PASSWORD: $text = _('Incorrect password (Maybe you have CAPS LOCK on?)'); break; |
| | 171 | case ERR_NO_USERNAME: $text = _("Fatal error: Username cannot be empty"); break; |
| | 172 | case ERR_VALIDATION_EXPIRED: $text = _("Sorry, your %.0f minutes grace period to retrieve your email and validate your account has now expired. You will have to connect to the internet and validate your account from another location."); break; |
| | 173 | case ERR_ACCOUNT_INVALID: $text = _("Sorry, your account is not valid: "); break; |
| | 174 | default: $text = $errorCode; break; |
| | 175 | } |
| | 176 | return $text; |
| | 177 | } |
| | 178 | /* End error code definitions */ |
| | 179 | |