public function setHasRespondents($userId)
    {
        if (! $this->_get('gor_has_respondents')) {
            $values['gor_has_respondents'] = 1;
            $values['gor_changed']         = new \MUtil_Db_Expr_CurrentTimestamp();
            $values['gor_changed_by']      = $userId;

            $where = $this->db->quoteInto('gor_id_organization = ?', $this->_id);

            $this->db->update('gems__organizations', $values, $where);

            // Invalidate cache / change value
            $this->_set('gor_has_respondents', 1);
        }

        return $this;
    }
public function setHasRespondents($userId)
    {
        if (! $this->_get('gor_has_respondents')) {
            $values['gor_has_respondents'] = 1;
            $values['gor_changed']         = new \MUtil_Db_Expr_CurrentTimestamp();
            $values['gor_changed_by']      = $userId;

            $where = $this->db->quoteInto('gor_id_organization = ?', $this->_id);

            $this->db->update('gems__organizations', $values, $where);

            // Invalidate cache / change value
            $this->_set('gor_has_respondents', 1);
        }

        return $this;
    }
public function setHasRespondents ( $ userId ) { if ( ! $ this -> _get ( 'gor_has_respondents' ) ) { $ values [ 'gor_has_respondents' ] = 1 ; $ values [ 'gor_changed' ] = new \ MUtil_Db_Expr_CurrentTimestamp ( ) ; $ values [ 'gor_changed_by' ] = $ userId ; $ where = $ this -> db -> quoteInto ( 'gor_id_organization = ?' , $ this -> _id ) ; $ this -> db -> update ( 'gems__organizations' , $ values , $ where ) ; // Invalidate cache / change value $ this -> _set ( 'gor_has_respondents' , 1 ) ; } return $ this ; }
Tell the organization there is at least one respondent attached to it.

Does nothing if this is already known.

@param int $userId The current user
@return \Gems_User_Organization (continuation pattern)
Tell the organization there is at least one respondent attached to it .