def get_user_info(self, connection, rid=501):
        """
        Get user information for the user with the specified RID
        """
        remoteOps = RemoteOperations(smbConnection=connection.conn, doKerberos=False)
        machine_name, domain_name = remoteOps.getMachineNameAndDomain()

        try:
            remoteOps.connectSamr(machine_name)
        except samr.DCERPCSessionError:
            # If connecting to machine_name didn't work, it's probably because
            # we're dealing with a domain controller, so we need to use the
            # actual domain name instead of the machine name, because DCs don't
            # use the SAM
            remoteOps.connectSamr(domain_name)

        dce = remoteOps._RemoteOperations__samr
        domain_handle = remoteOps._RemoteOperations__domainHandle
        user_handle = samr.hSamrOpenUser(dce, domain_handle, userId=rid)['UserHandle']
        user_info = samr.hSamrQueryInformationUser2(dce, user_handle, samr.USER_INFORMATION_CLASS.UserAllInformation)
        user_info = user_info['Buffer']['All']
        remoteOps.finish()
        return user_info

        Get user information for the user with the specified RID
        
cme/modules/wcc.py