some more stuff

This commit is contained in:
2024-02-03 17:30:51 +01:00
parent 87c12b0bb4
commit 6f07524342
5 changed files with 40 additions and 12 deletions

View File

@@ -33,6 +33,16 @@
doAccountAction(data, "Profile update Successful!", "Profile update failed.");
}
function updateEmail() {
const newEmail = document.getElementById("updateNewEmail").value;
const data = new URLSearchParams();
data.append("action", "update_user_email");
data.append("email", newEmail);
doAccountAction(data, "Email update Successful!", "Email update failed.");
}
async function getUserInfo() {
const userId = document.getElementById("getUserInfoId").value;
@@ -120,6 +130,16 @@
</form>
</div>
<div class="form-container" id="updateUserEmailForm">
<h1>Update User Email</h1>
<form>
<label for="updateNewEmail">New Email:</label>
<input type="email" id="updateNewEmail" name="updateNewEmail" required>
<button type="button" onclick="updateEmail()">Update Email</button>
</form>
</div>
<button type="button" onclick="logout()">Logout</button>
<!-- Include other user action forms similarly -->