Project import generated by Copybara.

GitOrigin-RevId: 63746295f1a5ab5a619056791995793d65529e62
diff --git a/src/dochangepassword.php b/src/dochangepassword.php
new file mode 100644
index 0000000..179b0e8
--- /dev/null
+++ b/src/dochangepassword.php
@@ -0,0 +1,20 @@
+<?php
+require_once("core.php");
+security::checkType(security::WORKER);
+security::checkWorkerUIEnabled();
+
+if (!security::checkParams("POST", [
+  ["oldpassword", security::PARAM_NEMPTY],
+  ["newpassword", security::PARAM_NEMPTY]
+])) {
+  security::go("users.php?msg=empty");
+}
+
+$oldpassword = $_POST["oldpassword"];
+$newpassword = $_POST["newpassword"];
+
+if (people::workerViewChangePassword($oldpassword, $newpassword)) {
+  header("Location: workerhome.php?msg=passwordchanged");
+} else {
+  header("Location: changepassword.php?msg=wrong");
+}