From a5f50db64cd1dca530203ef430b81929eff2b744 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 31 Jul 2022 09:53:57 -0700 Subject: Check registration enabled --- modern/src/settings/UserPage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modern/src/settings/UserPage.js') diff --git a/modern/src/settings/UserPage.js b/modern/src/settings/UserPage.js index 392339d0..85f4ae34 100644 --- a/modern/src/settings/UserPage.js +++ b/modern/src/settings/UserPage.js @@ -58,6 +58,7 @@ const UserPage = () => { const fixedEmail = useRestriction('fixedEmail'); const currentUser = useSelector((state) => state.session.user); + const registrationEnabled = useSelector((state) => state.session.server.registration); const commonUserAttributes = useCommonUserAttributes(t); const userAttributes = useUserAttributes(t); @@ -351,7 +352,7 @@ const UserPage = () => { definitions={{ ...commonUserAttributes, ...userAttributes }} focusAttribute={attribute} /> - {item.id === currentUser.id && !manager && ( + {registrationEnabled && item.id === currentUser.id && !manager && ( }> -- cgit v1.2.3