Changeset 5954 for sandbox/webservice/api/json-rpc/Expresso.php
- Timestamp:
- 04/16/12 17:34:31 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/webservice/api/json-rpc/Expresso.php
r5896 r5954 49 49 50 50 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 } 54 60 } 55 61 else{ 56 $this-> error = "You are not logged in";62 $this-> error = Errors::get(Errors::LOGIN_NOT_LOGGED_IN); 57 63 return false; 58 64 } … … 67 73 if(!$this-> isLoggedIn($params)) 68 74 { 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'])) 75 76 { 76 77 $this->error = null; … … 82 83 else 83 84 { 84 $this-> error = $GLOBALS['phpgw']->session->reason;85 $this-> error = Errors::get($GLOBALS['phpgw']->session->cd_reason); 85 86 } 86 87 }
Note: See TracChangeset
for help on using the changeset viewer.