diff --git a/src/pages/user_profile/AffiliationAndRoles.js b/src/pages/user_profile/AffiliationAndRoles.js index 9da547a76..dacff3903 100644 --- a/src/pages/user_profile/AffiliationAndRoles.js +++ b/src/pages/user_profile/AffiliationAndRoles.js @@ -1,7 +1,8 @@ import React, { useEffect, useState } from 'react'; import { Institution, User } from '../../libs/ajax'; import { find, isNil, isNumber } from 'lodash'; -import { Notifications } from '../../libs/utils'; +import { Notifications, setUserRoleStatuses } from '../../libs/utils'; +import { Storage } from '../../libs/storage'; import { FormField, FormFieldTypes } from '../../components/forms/forms'; import Tooltip from '@mui/material/Tooltip'; import { ThemeProvider, createTheme } from '@mui/material/styles'; @@ -115,6 +116,7 @@ export default function AffiliationAndRole(props) { }; let updatedUser = await User.updateSelf(payload); + setUserRoleStatuses(updatedUser, Storage); return updatedUser; }; @@ -247,4 +249,4 @@ export default function AffiliationAndRole(props) { {profile.roles}

; -} \ No newline at end of file +}