Scalr_Account_User::setAclRoles PHP Method

setAclRoles() public method

This method modifies resords of two tables account_team_users and account_team_user_acls. Attention! It expects full list of the ACL roles relations for user. All missing relations will be removed.
public setAclRoles ( array $data = [] )
$data array ACL roles array which looks like array(teamId => array(accountRoleId1, accountRoleId2, ...))
    public function setAclRoles(array $data = array())
    {
        if (empty($this->id)) {
            throw new \Scalr\Acl\Exception\AclException("Object hasn't been initialized. Identifier of the user is expected.");
        }
        \Scalr::getContainer()->acl->setAllRolesForUser($this->id, $data, $this->getAccountId());
    }