I am trying to remove the global team from user's profile by the following code in logic hook
//Retrieve the bean
$bean = BeanFactory::getBean($module, $record_id);
//Load the team relationship
//Remove the teams
$team_id_1 = 1
But this only remove the user from the list of users in Team management screen.I also need to remove the team from the Users->Access->My teams tab.
How can remove a record from the Users->Access->My teams .