fix: remove diacritic in userId

pull/12/head
c-cal 5 years ago
parent b72b7cd756
commit 4a127adca1
Signed by: watcha
GPG Key ID: 87DD78E7F7A1581D
  1. 10
      src/UsersTab.js

@ -8,14 +8,13 @@ import React, {
import { useGet, useMutate } from "restful-react";
import { useTranslation } from "react-i18next";
import { useDispatchContext, useUserIdContext } from "./contexts";
import Button from "./NewItemButton";
import Date from "./Date";
import DelayedSpinner from "./DelayedSpinner";
import TableTab, { compareLowerCase } from "./TableTab";
import { useDispatchContext, useUserIdContext } from "./contexts";
import NewItemModal from "./NewItemModal";
import NewUserForm from "./NewUserForm";
import TableTab, { compareLowerCase } from "./TableTab";
import UserRightPanel from "./UserRightPanel";
const ns = "usersTab";
@ -98,7 +97,10 @@ export default () => {
const newItemModal = useMemo(() => {
const onSubmit = data => {
const userId = data.emailAddress.replace("@", "/");
const userId = data.emailAddress
.replace("@", "/")
.normalize("NFKD")
.replace(/[\u0300-\u036F]/g, "");
post({
admin: data.isSynapseAdministrator ? "admin" : false,
email: data.emailAddress,

Loading…
Cancel
Save