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:
@@ -78,7 +78,8 @@ if ($twofa == 0) {
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="olt">Mobiltelefon</label>
|
||||
<div class="col-lg-3">
|
||||
<input placeholder="+4366411223344" type="text" class="form-control input-control"
|
||||
<input placeholder="+4366411223344" type="text"
|
||||
class="form-control input-control"
|
||||
name="mobile" id="mobile"
|
||||
value="<?= $userprofile->mobile ?>" <?php if ($twofa == 2) : ?> disabled="disabled" <?php endif; ?>/>
|
||||
</div>
|
||||
@@ -125,10 +126,7 @@ if ($twofa == 0) {
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var verficationtype;
|
||||
$.getJSON("https://<?= $_SERVER['SERVER_NAME']; ?>/UserProfile/api?do=checkverfication", {}).done(function (data) {
|
||||
verficationtype = data.data.verficationtype;
|
||||
});
|
||||
var verficationtype = <?= $twofa ?>;
|
||||
$('form').submit(function (e) {
|
||||
var me = this;
|
||||
if ($('#verification2fa').is(":hidden")) {
|
||||
@@ -138,18 +136,15 @@ if ($twofa == 0) {
|
||||
$('#verification2fa').show();
|
||||
$('#code').attr("required", true);
|
||||
|
||||
$.getJSON("https://<?= $_SERVER['SERVER_NAME']; ?>/UserProfile/api?do=sendcode&twofactor=" + verficationtype, {}).done(function (data) {
|
||||
$.getJSON("<?= self::getUrl("UserProfile", "api", ['do' => 'sendcode', 'twofactor' => $twofa]) ?>", {}).done(function (data) {
|
||||
}).fail(function (jqxhr, textStatus, error) {
|
||||
window.location.href = "/Dashboard";
|
||||
});
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
$("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' => $twofa]) ?>", {}).done(function (data) {
|
||||
$("#new-authcode").hide(0).delay(5000).show(0);
|
||||
}).fail(function (jqxhr, textStatus, error) {
|
||||
window.location.href = "/Dashboard";
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user