remove userProfileMetadata from user (#25608)
fixes: #25463 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
parent
dd90ffccaf
commit
01e7a58aa4
1 changed files with 5 additions and 4 deletions
|
@ -103,13 +103,13 @@ export default function EditUser() {
|
|||
adminClient.users.findOne({
|
||||
id: id!,
|
||||
userProfileMetadata: true,
|
||||
}) as UIUserRepresentation,
|
||||
}) as UIUserRepresentation | undefined,
|
||||
adminClient.attackDetection.findOne({ id: id! }),
|
||||
getUnmanagedAttributes(id!),
|
||||
adminClient.users.getProfile({ realm: realmName }),
|
||||
]),
|
||||
([realm, user, attackDetection, unmanagedAttributes, upConfig]) => {
|
||||
if (!user || !realm || !attackDetection) {
|
||||
([realm, userData, attackDetection, unmanagedAttributes, upConfig]) => {
|
||||
if (!userData || !realm || !attackDetection) {
|
||||
throw new Error(t("notFound"));
|
||||
}
|
||||
|
||||
|
@ -117,8 +117,9 @@ export default function EditUser() {
|
|||
isFeatureEnabled(Feature.DeclarativeUserProfile) &&
|
||||
realm.attributes?.userProfileEnabled === "true";
|
||||
|
||||
const { userProfileMetadata, ...user } = userData;
|
||||
setUserProfileMetadata(
|
||||
isUserProfileEnabled ? user.userProfileMetadata : undefined,
|
||||
isUserProfileEnabled ? userProfileMetadata : undefined,
|
||||
);
|
||||
|
||||
if (isUserProfileEnabled) {
|
||||
|
|
Loading…
Reference in a new issue