示例#1
0
文件: user.php 项目: uvicate/users
     if (!$server->verifyResourceRequest($request, $response, $requiredScope)) {
         $response = $server->getResponse();
         $response->send();
         die;
     }
     //Get all information
     //---------------------
     foreach ($validkeys as $key => $value) {
         if (array_key_exists($key, $_GET)) {
             $param = null;
             if ($key != 'id') {
                 $param = array($key);
             }
             $id = $_GET[$key];
             $usr = $user->getby_id($id, $param);
             $usr = $user->handleResponse($usr);
             $success = true;
             break;
         }
     }
     break;
 case 'PUT':
     //Update information
     //---------------------
     $id = $_GET['id'];
     $arr = array('id' => $id);
     $user = new \uVicate\User($arr);
     $usr = $user->edit($PUT);
     $success = true;
     break;
 case 'DELETE':