in enginframe/hydrogen.manage-users.js [504:546]
dialogButtons[buttonLabel] = function () {
var userName, password, re_password, realName, groups, sdf, namespace;
if (!isEdit) {
userName = userNameEntry.val();
password = passwordEntry.val();
re_password = re_passwordEntry.val();
if (userName.length <= 0) {
jQuery('.ef-manage-user-dialog-message').hymessage().hymessage('alert', "User Name cannot be empty");
return false;
}
if (!/^[_a-zA-Z0-9][_a-zA-Z0-9.@\-]*$/.test(userName)) {
jQuery('.ef-manage-user-dialog-message').hymessage().hymessage('alert', "Invalid User Name: Allowed characters are letters, digits or one of _ . - @");
return false;
}
if (password != re_password) {
jQuery('.ef-manage-user-dialog-message').hymessage().hymessage('alert', "You entered two different password.");
return false;
}
}
else {
userName = oldUserName;
}
realName = realNameEntry.val();
groups = groupsEntry.val();
jQuery(this).dialog("close");
// add group admin if checkbox Administrator is checked
if (jQuery(isAdminEntry).is(':checked')) {
if (groups) {
groups += ",admin";
}
else {
groups += "admin";
}
}
actionfunc(userName, password, re_password, realName, groups);
};