protected function _getUserTo($monitorName)
    {
        switch ($monitorName) {
            case 'maintenancemode':
                $roles = $this->util->getDbLookup()->getRolesByPrivilege('pr.maintenance.maintenance-mode');
                if ($roles) {
                    $joins = "JOIN gems__groups ON gsf_id_primary_group = ggp_id_group 
                      JOIN gems__roles ON ggp_role = grl_id_role";

                    $where = 'grl_name IN (' .
                            implode(', ', array_map(array($this->db, 'quote'), array_keys($roles))) .
                            ')';
                } else {
                    return [];
                }
                break;

            case 'cronmail':
            default:
                $joins = '';
                $where = 'gsf_mail_watcher = 1';
                break;
        }
        
        $userTo = $this->db->fetchCol(
                "SELECT DISTINCT gsf_email FROM gems__staff $joins WHERE LENGTH(gsf_email) > 5 AND gsf_active = 1 AND $where"
                );
        return $userTo;
    }
protected function _getUserTo($monitorName)
    {
        switch ($monitorName) {
            case 'maintenancemode':
                $roles = $this->util->getDbLookup()->getRolesByPrivilege('pr.maintenance.maintenance-mode');
                if ($roles) {
                    $joins = "JOIN gems__groups ON gsf_id_primary_group = ggp_id_group 
                      JOIN gems__roles ON ggp_role = grl_id_role";

                    $where = 'grl_name IN (' .
                            implode(', ', array_map(array($this->db, 'quote'), array_keys($roles))) .
                            ')';
                } else {
                    return [];
                }
                break;

            case 'cronmail':
            default:
                $joins = '';
                $where = 'gsf_mail_watcher = 1';
                break;
        }
        
        $userTo = $this->db->fetchCol(
                "SELECT DISTINCT gsf_email FROM gems__staff $joins WHERE LENGTH(gsf_email) > 5 AND gsf_active = 1 AND $where"
                );
        return $userTo;
    }
protected function _getUserTo ( $ monitorName ) { switch ( $ monitorName ) { case 'maintenancemode' : $ roles = $ this -> util -> getDbLookup ( ) -> getRolesByPrivilege ( 'pr.maintenance.maintenance-mode' ) ; if ( $ roles ) { $ joins = "JOIN gems__groups ON gsf_id_primary_group = ggp_id_group 
                      JOIN gems__roles ON ggp_role = grl_id_role" ; $ where = 'grl_name IN (' . implode ( ', ' , array_map ( array ( $ this -> db , 'quote' ) , array_keys ( $ roles ) ) ) . ')' ; } else { return [ ] ; } break ; case 'cronmail' : default : $ joins = '' ; $ where = 'gsf_mail_watcher = 1' ; break ; } $ userTo = $ this -> db -> fetchCol ( "SELECT DISTINCT gsf_email FROM gems__staff $joins WHERE LENGTH(gsf_email) > 5 AND gsf_active = 1 AND $where" ) ; return $ userTo ; }
Return an array of user recipients for the given monitorName

@param string $monitorName
@return array
Return an array of user recipients for the given monitorName