If user use token to login and the user name is not provided in the config we could use the getUserFromToken function to get the user name with the given token. But the function need user have the permission to use, so it's not available to all users.
We could use the function if current token user is allowed to update the user name for cfg, or else we need caught the exception with the permission error and skip update the user with cfg object.
If user use token to login and the user name is not provided in the config we could use the getUserFromToken function to get the user name with the given token. But the function need user have the permission to use, so it's not available to all users.
We could use the function if current token user is allowed to update the user name for cfg, or else we need caught the exception with the permission error and skip update the user with cfg object.