Project import generated by Copybara.

GitOrigin-RevId: 63746295f1a5ab5a619056791995793d65529e62
diff --git a/src/ajax/addpersontocompany.php b/src/ajax/addpersontocompany.php
new file mode 100644
index 0000000..fb5d3c3
--- /dev/null
+++ b/src/ajax/addpersontocompany.php
@@ -0,0 +1,19 @@
+<?php
+require_once(__DIR__."/../core.php");
+security::checkType(security::ADMIN, security::METHOD_NOTFOUND);
+
+if (!security::checkParams("POST", [
+  ["person", security::PARAM_NEMPTY],
+  ["company", security::PARAM_NEMPTY]
+])) {
+  api::error();
+}
+
+$person = (int)$_POST["person"];
+$company = (int)$_POST["company"];
+
+if (people::addToCompany($person, $company)) {
+  echo "OK\n";
+} else {
+  api::error();
+}