MM-26667 Set EMM username as the initial loginId (#4524)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
This commit is contained in:
Mattermost Build 2020-07-02 21:03:31 +02:00 committed by GitHub
parent 0ef94c23af
commit ef4bc3b1e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -297,7 +297,8 @@ export default class Login extends PureComponent {
setEmmUsernameIfAvailable = async () => {
const managedConfig = await mattermostManaged.getConfig();
if (managedConfig?.username && this.loginRef.current) {
this.loginRef.current.setNativeProps({text: managedConfig?.username});
this.loginRef.current.setNativeProps({text: managedConfig.username});
this.loginId = managedConfig.username;
}
}