Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 242 Rev 630
Línea 165... Línea 165...
165
        $prototype = new User();
165
        $prototype = new User();
166
        $select = $this->sql->select(self::_TABLE);
166
        $select = $this->sql->select(self::_TABLE);
Línea 167... Línea 167...
167
        
167
        
168
        
168
        
Línea 169... Línea 169...
169
        $select->where->equalTo('status', User::STATUS_ACTIVE);
169
        $select->where->equalTo('status', User::STATUS_ACTIVE);
170
        $select->where->and->in('id',$ids)->equalTo('status', $status);
170
        $select->where->and->in('id',$ids);
171
        
171
        
-
 
172
        if($current_user) {
Línea 172... Línea 173...
172
        if($current_user) {
173
            $select->where->and->notEqualTo('id ', $current_user);
173
            $select->where->and->notEqualTo('id ', $current_user);
174
        }
Línea 791... Línea 792...
791
        $update->where->equalTo('id', $id);
792
        $update->where->equalTo('id', $id);
Línea 792... Línea 793...
792
        
793
        
793
        return $this->executeUpdate($update);
794
        return $this->executeUpdate($update);
Línea -... Línea 795...
-
 
795
    }
-
 
796
        
-
 
797
    
-
 
798
    /**
-
 
799
     *
-
 
800
     * @param int $company_id
-
 
801
     * @return User[]
-
 
802
     */
-
 
803
    public function fetchAllVerifyAndActiveByCompanyId($company_id)
-
 
804
    {
-
 
805
        $select = $this->sql->select();
-
 
806
        $select->columns(['status', 'company_id']);
-
 
807
        $select->from(['tb1' => CompanyUserMapper::_TABLE]);
-
 
808
        $select->join(['tb2' => self::_TABLE] , 'tb1.user_id = tb2.id');
-
 
809
        
-
 
810
 
-
 
811
        
-
 
812
        $select->where->equalTo('tb1.company_id', $company_id);
-
 
813
        $select->where->equalTo('tb1.owner', CompanyUser::OWNER_NO);
-
 
814
        $select->where->in('tb1.status', [CompanyUser::STATUS_ACCEPTED, CompanyUser::STATUS_ADMIN_WILL_ADD]);
-
 
815
        $select->where->equalTo('tb2.email_verified', User::EMAIL_VERIFIED_YES);
-
 
816
        $select->where->equalTo('tb2.status', User::STATUS_ACTIVE);
-
 
817
        
-
 
818
        $select->order('first_name', 'last_name', 'email');
-
 
819
 
-
 
820
        $prototype = User();
-
 
821
      
794
    }
822
        return $this->executeFetchAllObject($select, $prototype);