diff --git a/data/web/js/build/014-mailcow.js b/data/web/js/build/014-mailcow.js index b8992f59..26602714 100644 --- a/data/web/js/build/014-mailcow.js +++ b/data/web/js/build/014-mailcow.js @@ -15,7 +15,12 @@ $(document).ready(function() { $(".generate_password").click(function( event ) { event.preventDefault(); $('[data-hibp]').trigger('input'); - var random_passwd = GPW.pronounceable(8) + if (typeof($(this).closest("form").data('pwgen-length')) == "number") { + var random_passwd = GPW.pronounceable($(this).closest("form").data('pwgen-length')) + } + else { + var random_passwd = GPW.pronounceable(8) + } $(this).closest("form").find('[data-pwgen-field]').attr('type', 'text'); $(this).closest("form").find('[data-pwgen-field]').val(random_passwd); }); diff --git a/data/web/modals/user.php b/data/web/modals/user.php index d32a2560..90e50a68 100644 --- a/data/web/modals/user.php +++ b/data/web/modals/user.php @@ -171,7 +171,7 @@ if (!isset($_SESSION['mailcow_cc_role'])) {