public function addLoginCheck()
    {
        if (! $this->hasAlias('gems__user_logins')) {
            $this->addLeftTable(
                    'gems__user_logins',
                    array('gr2o_patient_nr' => 'gul_login', 'gr2o_id_organization' => 'gul_id_organization'),
                    'gul',
                    \MUtil_Model_DatabaseModelAbstract::SAVE_MODE_UPDATE |
                        \MUtil_Model_DatabaseModelAbstract::SAVE_MODE_DELETE);
        }

        $this->addColumn(
                "CASE WHEN gul_id_user IS NULL OR gul_user_class = 'NoLogin' OR gul_can_login = 0 THEN 0 ELSE 1 END",
                'has_login');

        return $this;
    }
public function addLoginCheck()
    {
        if (! $this->hasAlias('gems__user_logins')) {
            $this->addLeftTable(
                    'gems__user_logins',
                    array('gr2o_patient_nr' => 'gul_login', 'gr2o_id_organization' => 'gul_id_organization'),
                    'gul',
                    \MUtil_Model_DatabaseModelAbstract::SAVE_MODE_UPDATE |
                        \MUtil_Model_DatabaseModelAbstract::SAVE_MODE_DELETE);
        }

        $this->addColumn(
                "CASE WHEN gul_id_user IS NULL OR gul_user_class = 'NoLogin' OR gul_can_login = 0 THEN 0 ELSE 1 END",
                'has_login');

        return $this;
    }
public function addLoginCheck ( ) { if ( ! $ this -> hasAlias ( 'gems__user_logins' ) ) { $ this -> addLeftTable ( 'gems__user_logins' , array ( 'gr2o_patient_nr' => 'gul_login' , 'gr2o_id_organization' => 'gul_id_organization' ) , 'gul' , \ MUtil_Model_DatabaseModelAbstract :: SAVE_MODE_UPDATE | \ MUtil_Model_DatabaseModelAbstract :: SAVE_MODE_DELETE ) ; } $ this -> addColumn ( "CASE WHEN gul_id_user IS NULL OR gul_user_class = 'NoLogin' OR gul_can_login = 0 THEN 0 ELSE 1 END" , 'has_login' ) ; return $ this ; }
Add the table and field to check for respondent login checks

@return \Gems_Model_RespondentModel (continuation pattern)
Add the table and field to check for respondent login checks