diff --git a/frontend/src/OnlineClassroom/ClassroomUserCreation.tsx b/frontend/src/OnlineClassroom/ClassroomUserCreation.tsx index d32da0f..26e88a2 100644 --- a/frontend/src/OnlineClassroom/ClassroomUserCreation.tsx +++ b/frontend/src/OnlineClassroom/ClassroomUserCreation.tsx @@ -32,13 +32,18 @@ export function ClassroomUserCreation(props: { const maternalSurname = props.person.person_maternal_surname; // The username may be composed of A-Z & 0-9. - const user = `${firstName[0]}${secondName?.[0] ?? ""}${paternalSurname}${maternalSurname[0]}` + const user = `${firstName[0]}${secondName?.[0] ?? ""}${paternalSurname}${maternalSurname?.[0] ?? ""}` .toUpperCase() .replaceAll("Á", "A") .replaceAll("É", "E") .replaceAll("Í", "I") .replaceAll("Ó", "O") .replaceAll("Ú", "U") + .replaceAll("Ä", "A") + .replaceAll("Ë", "E") + .replaceAll("Ï", "I") + .replaceAll("Ö", "O") + .replaceAll("Ü", "U") .replaceAll("Ñ", "N") .replaceAll(" ", "") .replaceAll("-", "");