mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 15:19:57 +09:00
After install, allow login by both user_id and email_address by default
This commit is contained in:
parent
2cdcfd13cf
commit
f92219f328
4 changed files with 15 additions and 9 deletions
|
|
@ -6,4 +6,13 @@ jQuery(function($){
|
|||
$("p.db_type_" + $(this).val()).show();
|
||||
}).triggerHandler("click");
|
||||
}
|
||||
if($("input[name='user_id']").size() && $("input[name='email_address']").size()) {
|
||||
var user_id_input = $("input[name='user_id']");
|
||||
var email_input = $("input[name='email_address']");
|
||||
email_input.on("blur", function() {
|
||||
if (user_id_input.val() == "") {
|
||||
user_id_input.val(email_input.val().replace(/@.+$/g, "").replace(/[^a-zA-Z0-9_]/g, ""));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue