Пример #1
0
 public function delete_array($array)
 {
     if (!empty($array["id"])) {
         $user = apiDB::getUser($array["id"]);
         if ($this->access <= 1) {
             return "Not authorized to delete User " . $user->id;
         } else {
             return apiDB::deleteUser($array["id"]);
         }
     } else {
         if (!empty($array["email"])) {
             if ($this->access <= 1) {
                 return "Not authorized to delete User " . $array["email"];
             } else {
                 return apiDB::deleteUserByEmail($array["email"]);
             }
         }
     }
     return "ERROR: No user ID or email specified for deletion";
 }