PHP User::Remove Examples

PHP User::Remove - 3 examples found. These are the top rated real world PHP examples of User::Remove extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
 /**
  * @method DELETE
  */
 function remove($userUniqId)
 {
     // get an authuser
     $authUser = new AuthUser();
     if (isset($authUser->UserUniqId)) {
         // check if authorized
         User::Remove($userUniqId);
         return new Tonic\Response(Tonic\Response::OK);
     } else {
         return new Tonic\Response(Tonic\Response::UNAUTHORIZED);
     }
 }
Example #2
0
 /**
  * @method POST
  */
 function post()
 {
     // get token
     $token = Utilities::ValidateJWTToken(apache_request_headers());
     // check if token is not null
     if ($token != NULL) {
         parse_str($this->request->data, $request);
         // parse request
         $userId = $request['userId'];
         User::Remove($userId);
         return new Tonic\Response(Tonic\Response::OK);
     } else {
         return new Tonic\Response(Tonic\Response::UNAUTHORIZED);
     }
 }
Example #3
0
 public function removeUser($stamp)
 {
     if ($this->validateAdmin()) {
         if (User::Remove($id)) {
             echo 1;
         } else {
             echo 0;
         }
     } else {
         echo 0;
     }
 }