Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 255 Rev 257
Línea 178... Línea 178...
178
        //echo $select->getSqlString($this->adapter->platform); exit;
178
        //echo $select->getSqlString($this->adapter->platform); exit;
Línea 179... Línea 179...
179
 
179
 
180
        return $this->executeFetchOneObject($select, $prototype);
180
        return $this->executeFetchOneObject($select, $prototype);
Línea -... Línea 181...
-
 
181
    }
-
 
182
 
-
 
183
    /**
-
 
184
     *
-
 
185
     * @param $username_xmpp
-
 
186
     * @return void|User
-
 
187
     */
-
 
188
    public function fetchOneByUsernameXmpp($username_xmpp)
-
 
189
    {
-
 
190
        $prototype = new User();
-
 
191
        $select = $this->sql->select(self::_TABLE);
-
 
192
        $select->where->equalTo('username_xmpp', $username_xmpp);
-
 
193
        
-
 
194
        //echo $select->getSqlString($this->adapter->platform); exit;
-
 
195
        
-
 
196
        return $this->executeFetchOneObject($select, $prototype);
-
 
197
    }
-
 
198
    
-
 
199
    
-
 
200
    /**
-
 
201
     *
-
 
202
     * @param $username_xmpp
-
 
203
     * @return void|User
-
 
204
     */
-
 
205
    public function fetchLastLikeUsernameXmpp($username_xmpp)
-
 
206
    {
-
 
207
        $prototype = new User();
-
 
208
        $select = $this->sql->select(self::_TABLE);
-
 
209
        $select->where->like('username_xmpp', $username_xmpp . '%');
-
 
210
        $select->order('id desc');
-
 
211
        
-
 
212
        return $this->executeFetchOneObject($select, $prototype);
-
 
213
    }
-
 
214
    
-
 
215
    /**
-
 
216
     *
-
 
217
     * @param $username_xmpp
-
 
218
     * @return void|User
-
 
219
     */
-
 
220
    public function fetchOneActiveByUsernameXmpp($username_xmpp)
-
 
221
    {
-
 
222
        $prototype = new User();
-
 
223
        $select = $this->sql->select(self::_TABLE);
-
 
224
        $select->where->equalTo('username_xmpp', $username_xmpp);
-
 
225
        $select->where->equalTo('status', User::STATUS_ACTIVE);
-
 
226
        $select->where->equalTo('email_verified', User::EMAIL_VERIFIED_YES);
-
 
227
        
-
 
228
        //echo $select->getSqlString($this->adapter->platform); exit;
-
 
229
        
Línea 181... Línea 230...
181
    }
230
        return $this->executeFetchOneObject($select, $prototype);
182
 
231
    }
183
 
232
 
Línea 426... Línea 475...
426
 
475
 
427
    /**
476
    /**
428
     *
477
     *
429
     * @return User[]
478
     * @return User[]
430
     */
479
     */
431
    public function fetchAllByActives()
480
    public function fetchAll()
Línea 432... Línea 481...
432
    {
481
    {
433
 
482
 
Línea 434... Línea -...
434
        $prototype = new User();
-
 
435
        $select = $this->sql->select(self::_TABLE);
-
 
436
 
-
 
437
 
-
 
438
        $select->where->equalTo('status', User::STATUS_ACTIVE);
-
 
439
        $select->where->equalTo('email_verified', User::EMAIL_VERIFIED_YES);
-
 
440
 
-
 
441
        $select->order(['first_name DESC, last_name DESC, email_DESC']);
483
        $prototype = new User();
442
 
484
        $select = $this->sql->select(self::_TABLE);
Línea 443... Línea 485...
443
 
485
 
444
        return $this->executeFetchAllObject($select, $prototype);
486
        return $this->executeFetchAllObject($select, $prototype);
Línea 794... Línea 836...
794
 
836
 
795
        
837
        
796
 
-
 
-
 
838
 
-
 
839
        unset($values['added_on']);
-
 
840
        $values['updated_on'] = new Expression('NOW()');
-
 
841
  
Línea 797... Línea 842...
797
        unset($values['added_on']);
842
        
798
        $values['updated_on'] = new Expression('NOW()');
843
        
799
        $values['password_xmpp'] = $user->password_xmpp ? $user->password_xmpp : '';
844