concrete/src/Conversation/Conversation.php
public function getConversationUsersToEmail()
    {
        $db = Loader::db();

        $ids = array();
        if (!$this->getConversationNotificationOverridesEnabled() > 0) {
            $ids = $db->GetCol('select uID from ConversationSubscriptions where cnvID = 0');
        }

        $r = $db->Execute('select uID, type from ConversationSubscriptions where cnvID = ?',
            array($this->getConversationID()));
        while ($row = $r->FetchRow()) {
            if ($row['type'] == 'U' && in_array($row['uID'], $ids)) {
                $ids = array_diff($ids, array($row['uID']));
            } else {
                $ids[] = $row['uID'];
            }
        }

        $ids = array_unique($ids);

        $users = array();
        foreach ($ids as $uID) {
            $ui = \UserInfo::getByID($uID);
            if (is_object($ui)) {
                $users[] = $ui;
            }
        }

        return $users;
    }
public function getConversationUsersToEmail()
    {
        $db = Loader::db();

        $ids = array();
        if (!$this->getConversationNotificationOverridesEnabled() > 0) {
            $ids = $db->GetCol('select uID from ConversationSubscriptions where cnvID = 0');
        }

        $r = $db->Execute('select uID, type from ConversationSubscriptions where cnvID = ?',
            array($this->getConversationID()));
        while ($row = $r->FetchRow()) {
            if ($row['type'] == 'U' && in_array($row['uID'], $ids)) {
                $ids = array_diff($ids, array($row['uID']));
            } else {
                $ids[] = $row['uID'];
            }
        }

        $ids = array_unique($ids);

        $users = array();
        foreach ($ids as $uID) {
            $ui = \UserInfo::getByID($uID);
            if (is_object($ui)) {
                $users[] = $ui;
            }
        }

        return $users;
    }
public function getConversationUsersToEmail ( ) { $ db = Loader :: db ( ) ; $ ids = array ( ) ; if ( ! $ this -> getConversationNotificationOverridesEnabled ( ) > 0 ) { $ ids = $ db -> GetCol ( 'select uID from ConversationSubscriptions where cnvID = 0' ) ; } $ r = $ db -> Execute ( 'select uID, type from ConversationSubscriptions where cnvID = ?' , array ( $ this -> getConversationID ( ) ) ) ; while ( $ row = $ r -> FetchRow ( ) ) { if ( $ row [ 'type' ] == 'U' && in_array ( $ row [ 'uID' ] , $ ids ) ) { $ ids = array_diff ( $ ids , array ( $ row [ 'uID' ] ) ) ; } else { $ ids [ ] = $ row [ 'uID' ] ; } } $ ids = array_unique ( $ ids ) ; $ users = array ( ) ; foreach ( $ ids as $ uID ) { $ ui = \ UserInfo :: getByID ( $ uID ) ; if ( is_object ( $ ui ) ) { $ users [ ] = $ ui ; } } return $ users ; }
Similar to the method below, but excludes global subscribers who have opted out of conversations, etc...
This method should be used any time we actually act on subscriptions, send emails, etc...
Similar to the method below but excludes global subscribers who have opted out of conversations etc ... This method should be used any time we actually act on subscriptions send emails etc ...