Fix user creation email notification (#1408)

* Fixes user creation email notification
* Closes #1398
This commit is contained in:
Kevin Chung
2020-05-14 12:20:59 -04:00
committed by GitHub
parent 7a3028857c
commit 03051e8d99
3 changed files with 11 additions and 3 deletions

View File

@@ -9,7 +9,15 @@ function createUser(event) {
event.preventDefault(); event.preventDefault();
const params = $("#user-info-create-form").serializeJSON(true); const params = $("#user-info-create-form").serializeJSON(true);
CTFd.fetch("/api/v1/users", { // Move the notify value into a GET param
let url = "/api/v1/users";
let notify = params.notify;
if (notify === true) {
url = `${url}?notify=true`;
}
delete params.notify;
CTFd.fetch(url, {
method: "POST", method: "POST",
credentials: "same-origin", credentials: "same-origin",
headers: { headers: {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long