Ignore:
Timestamp:
04/16/12 17:34:31 (12 years ago)
Author:
niltonneto
Message:

Ticket #2507 - Corrigido método getUserId(). Renomeado classe http_request.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/webservice/api/json-rpc/Expresso.php

    r5896 r5954  
    4949         
    5050        protected function isLoggedIn($params){ 
    51                 list($sessionid, $kp3) = explode(":", $params['auth']); 
    52                 if($GLOBALS['phpgw']->session->verify($sessionid, $kp3)){                                                                        
    53                         return true; 
     51                if($params['auth'] != null) { 
     52                        list($sessionid, $kp3) = explode(":", $params['auth']); 
     53                        if($GLOBALS['phpgw']->session->verify($sessionid, $kp3)){                                                                        
     54                                return true; 
     55                        } 
     56                        else{ 
     57                                $this-> error = Errors::get(Errors::LOGIN_AUTH_INVALID); 
     58                                return false; 
     59                        } 
    5460                } 
    5561                else{ 
    56                         $this-> error = "You are not logged in"; 
     62                        $this-> error = Errors::get(Errors::LOGIN_NOT_LOGGED_IN); 
    5763                        return false; 
    5864                }                
     
    6773                if(!$this-> isLoggedIn($params))  
    6874                {                                
    69                         if($params['auth'] != "")  
    70                         {        
    71                                 $this->error  = "Your auth is invalid"; 
    72                                  
    73                         } 
    74                         elseif($sessionid = $GLOBALS['phpgw']->session->create($params['user'], $params['password']))                                    
     75                        if($sessionid = $GLOBALS['phpgw']->session->create($params['user'], $params['password']))                                        
    7576                        { 
    7677                                $this->error  = null; 
     
    8283                        else 
    8384                        {                                
    84                                 $this-> error = $GLOBALS['phpgw']->session->reason; 
     85                                $this-> error = Errors::get($GLOBALS['phpgw']->session->cd_reason); 
    8586                        }                        
    8687                } 
Note: See TracChangeset for help on using the changeset viewer.