diff --git a/components/integrations/bots/add_bot/add_bot.jsx b/components/integrations/bots/add_bot/add_bot.jsx
index 0a69541dd330..dcb5737fe0a9 100644
--- a/components/integrations/bots/add_bot/add_bot.jsx
+++ b/components/integrations/bots/add_bot/add_bot.jsx
@@ -572,18 +572,12 @@ export default class AddBot extends React.Component {
diff --git a/components/integrations/bots/add_bot/index.js b/components/integrations/bots/add_bot/index.js
index be8dec6b3ae9..6679b973015c 100644
--- a/components/integrations/bots/add_bot/index.js
+++ b/components/integrations/bots/add_bot/index.js
@@ -8,7 +8,7 @@ import {updateUserRoles, uploadProfileImage, setDefaultProfileImage, createUserA
import {createBot, patchBot} from 'mattermost-redux/actions/bots';
import {getBotAccounts} from 'mattermost-redux/selectors/entities/bots';
import {getConfig} from 'mattermost-redux/selectors/entities/general';
-import {getUsers} from 'mattermost-redux/selectors/entities/common';
+import {getUser} from 'mattermost-redux/selectors/entities/users';
import {haveISystemPermission} from 'mattermost-redux/selectors/entities/roles';
import {Permissions} from 'mattermost-redux/constants';
@@ -19,13 +19,14 @@ function mapStateToProps(state, ownProps) {
const botId = (new URLSearchParams(ownProps.location.search)).get('id');
const bots = getBotAccounts(state);
const bot = bots ? bots[botId] : null;
- const user = bot ? getUsers(state)[bot.user_id] : null;
+ const user = bot ? getUser(state, bot.user_id) : null;
const roles = user ? user.roles : null;
return {
maxFileSize: parseInt(config.MaxFileSize, 10),
bot,
roles,
editingUserHasManageSystem: haveISystemPermission(state, {permission: Permissions.MANAGE_SYSTEM}),
+ user,
};
}