Show
Ignore:
Timestamp:
02/25/10 15:56:33 (2 years ago)
Author:
gbastien
Message:
  • Added possibility to have a deployed geolocated node not show on map (quick fix) (#706)
  • When producing anonymised data export, two files are produced, one for the geolocated nodes and one for the connections (#705)
  • Additions and bug fixes to web service: can now logout and auth returns both error code and message
  • Starting work on #707 as needed
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/classes/User.php

    r1439 r1453  
    516516 
    517517    /** 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) { 
    520521        global $account_status_to_text; 
    521522        $db = AbstractDb::getObject(); 
     
    530531 
    531532            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; 
    533535                $retval = false; 
    534536            } else { 
     
    537539            } 
    538540        } 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; 
    540543            $retval = false; 
    541544        }