form/admin: don't allow "+" in username/email

Jellyfin doesn't like this.
This commit is contained in:
Harvey Tindall
2024-08-24 14:21:15 +01:00
parent a7aa3fd53e
commit 6c30a1ff40
9 changed files with 64 additions and 9 deletions
+6 -1
View File
@@ -1138,7 +1138,12 @@ export class accountsList {
console.log("User created, but welcome email failed");
}
} else {
window.notifications.customError("addUser", window.lang.var("notifications", "errorUserCreated", `"${send['username']}"`));
let msg = window.lang.var("notifications", "errorUserCreated", `"${send['username']}"`);
if ("error" in req.response) {
let realError = window.lang.notif(req.response["error"]);
if (realError) msg = realError;
}
window.notifications.customError("addUser", msg);
}
if (req.response["error"] as String) {
console.log(req.response["error"]);