-
-
-
+
+
+
+
+
+
+
+
+ setCurrentPermission(newPermission)
+ }
+ />
+
+
-
-
-
- setCurrentPermission(newPermission)
- }
- />
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
- >
+
+ )}
+
);
};
diff --git a/src/components/UserList/index.tsx b/src/components/UserList/index.tsx
index 4c98db270..aa5d844e9 100644
--- a/src/components/UserList/index.tsx
+++ b/src/components/UserList/index.tsx
@@ -452,7 +452,7 @@ const UserList: React.FC = () => {
- {user.username}
+ {user.displayName}
{user.email}
diff --git a/src/context/UserContext.tsx b/src/context/UserContext.tsx
index 24809a18c..ba1bc1a1f 100644
--- a/src/context/UserContext.tsx
+++ b/src/context/UserContext.tsx
@@ -1,5 +1,5 @@
import React, { useEffect, useRef } from 'react';
-import { User, useUser } from '../hooks/useUser';
+import { useUser, User } from '../hooks/useUser';
import { useRouter } from 'next/dist/client/router';
interface UserContextProps {
diff --git a/src/hooks/useUser.ts b/src/hooks/useUser.ts
index c2102a009..18d67bf06 100644
--- a/src/hooks/useUser.ts
+++ b/src/hooks/useUser.ts
@@ -2,17 +2,19 @@ import useSwr from 'swr';
import { hasPermission, Permission } from '../../server/lib/permissions';
import { UserType } from '../../server/constants/user';
+export { Permission, UserType };
+
export interface User {
id: number;
- username: string;
+ plexUsername?: string;
+ username?: string;
+ displayName: string;
email: string;
avatar: string;
permissions: number;
userType: number;
}
-export { Permission, UserType };
-
interface UserHookResponse {
user?: User;
loading: boolean;
diff --git a/src/i18n/locale/en.json b/src/i18n/locale/en.json
index be5768790..d04a01419 100644
--- a/src/i18n/locale/en.json
+++ b/src/i18n/locale/en.json
@@ -508,7 +508,7 @@
"components.UserEdit.save": "Save",
"components.UserEdit.saving": "Saving…",
"components.UserEdit.userfail": "Something went wrong saving the user.",
- "components.UserEdit.username": "Username",
+ "components.UserEdit.username": "Display Name",
"components.UserEdit.usersaved": "User saved",
"components.UserList.admin": "Admin",
"components.UserList.autogeneratepassword": "Automatically generate password",