UserToken Methoden static hinzugefügt

Bug bei Passwortlängencheck gefixt
JS Request URLs auf getUrl umgebaut
2FA Code wird bei eingabe nun üngiltig
This commit is contained in:
Spitzer_Daniel
2023-08-28 15:25:59 +02:00
parent f95d0b0074
commit 28ca65fa6d
6 changed files with 33 additions and 25 deletions

View File

@@ -188,13 +188,14 @@ if ($userprofile->twofactor == 0) {
$(document).ready(function () {
$("body").on("click", "#new-authcode", function (event) {
$.getJSON("https://<?= $_SERVER['SERVER_NAME']; ?>/UserProfile/api?do=sendcode&twofactor=" + $('#new-authcode').data('codetype'), {}).done(function (data) {
$.getJSON("<?= self::getUrl("UserProfile", "api", ['do' => 'sendcode', 'twofactor' => $verification]) ?>", {}).done(function (data) {
$("#new-authcode").hide(0).delay(5000).show(0);
}).fail(function (jqxhr, textStatus, error) {
window.location.href = "/Dashboard";
window.location.href = "<?= self::getUrl("Dashboard") ?>";
});
});
});
})
;
</script>