diff --git a/user_account.php b/user_account.php index 38cea4f..cf407ae 100644 --- a/user_account.php +++ b/user_account.php @@ -224,7 +224,16 @@ $().ready(function() { $("#username").attr("disabled", username_link); $("#username_link").click(function() { $("#username").attr("disabled", this.checked); + username_link_change(); }); + + function username_link_change() { + if($("#username_link").is(":checked")) { + $("#username").val($('#email').val()); + } + } + $("#email").change(username_link_change); + $("#email").keyup(username_link_change); });