Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 630 | Rev 1271 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 630 Rev 646
Línea 190... Línea 190...
190
        
190
        
191
        
191
        
Línea -... Línea 192...
-
 
192
        $select->where->equalTo('status', User::STATUS_ACTIVE);
-
 
193
        $select->where->equalTo('email_verified',User::EMAIL_VERIFIED_YES);
Línea 192... Línea 194...
192
        $select->where->equalTo('status', User::STATUS_ACTIVE);
194
        
193
        $select->where->equalTo('email_verified',User::EMAIL_VERIFIED_YES);
195
        $select->order(['first_name DESC, last_name DESC, email_DESC']);
Línea 194... Línea 196...
194
        
196
        
195
 
197
 
-
 
198
        return $this->executeFetchAllObject($select, $prototype);
-
 
199
    }
-
 
200
    
-
 
201
    /**
-
 
202
     * 
-
 
203
     * @param int $company_id
-
 
204
     * @return array
-
 
205
     */
-
 
206
    public function fetchAllByCompanyId($company_id)
-
 
207
    {
-
 
208
        
-
 
209
        $prototype = new User();
-
 
210
        $select = $this->sql->select();
-
 
211
        $select->from(['tb1' => self::_TABLE]);
-
 
212
        $select->join(['tb2' => CompanyUserMapper::_TABLE], 'tb1.id = tb2.user_id', []);
-
 
213
        
-
 
214
        
-
 
215
        $select->where->equalTo('tb2.company_id', $company_id);
-
 
216
        $select->where->in('tb2.status', [CompanyUser::STATUS_ACCEPTED, CompanyUser::STATUS_ADMIN_WILL_ADD]);
-
 
217
        
-
 
218
        $select->where->equalTo('tb1.status', User::STATUS_ACTIVE);
-
 
219
        $select->where->equalTo('tb1.email_verified',User::EMAIL_VERIFIED_YES);
-
 
220
        
-
 
221
        $select->order(['first_name DESC, last_name DESC, email_DESC']);
-
 
222
        
196
        return $this->executeFetchAllObject($select, $prototype);
223
        return $this->executeFetchAllObject($select, $prototype);
197
    }
224
    }
198
    
225
    
199
    /**
226
    /**
200
     * 
227
     *