Changeset 1453 for trunk/wifidog-auth/wifidog/classes/User.php
- Timestamp:
- 02/25/10 15:56:33 (2 years ago)
- Files:
-
- 1 modified
-
trunk/wifidog-auth/wifidog/classes/User.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/wifidog/classes/User.php
r1439 r1453 516 516 517 517 /** Is the user valid? Valid means that the account is validated or hasn't exhausted it's validation period. 518 $errmsg: Returs the reason why the account is or isn't valid */ 519 function isUserValid(& $errmsg = null) { 518 $errmsg: Returs the reason why the account is or isn't valid 519 $errno: Returns an error code identifying the error */ 520 function isUserValid(& $errmsg = null, &$errno = 0) { 520 521 global $account_status_to_text; 521 522 $db = AbstractDb::getObject(); … … 530 531 531 532 if ($user_info['validation_grace_time_expired'] == 't') { 532 $errmsg = sprintf(_("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."), $user_info['validation_grace_time']/60); 533 $errmsg = sprintf(getErrorText(ERR_VALIDATION_EXPIRED), $user_info['validation_grace_time']/60); 534 $errno = ERR_VALIDATION_EXPIRED; 533 535 $retval = false; 534 536 } else { … … 537 539 } 538 540 } else { 539 $errmsg = _("Sorry, your account is not valid: ") . $account_status_to_text[$account_status]; 541 $errmsg = getErrorText(ERR_ACCOUNT_INVALID) . $account_status_to_text[$account_status]; 542 $errno = ERR_ACCOUNT_INVALID; 540 543 $retval = false; 541 544 }
