mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 14:34:21 +01:00
Fix user creation email notification (#1408)
* Fixes user creation email notification * Closes #1398
This commit is contained in:
@@ -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
Reference in New Issue
Block a user