Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 1665 Rev 1979
Línea 253... Línea 253...
253
        $update->where->equalTo('id', $user_id);
253
        $update->where->equalTo('id', $user_id);
Línea 254... Línea 254...
254
        
254
        
255
        return $this->executeUpdate($update);
255
        return $this->executeUpdate($update);
Línea -... Línea 256...
-
 
256
    }
-
 
257
    
-
 
258
    
-
 
259
    /**
-
 
260
     *
-
 
261
     * @param int $user_id
-
 
262
     * @param string $delete_account_key
-
 
263
     * @return boolean
-
 
264
     */
-
 
265
    public function updateDeleteAccountKey($user_id, $delete_account_key)
-
 
266
    {
-
 
267
        $values = [
-
 
268
            'delete_account_key' => $delete_account_key,
-
 
269
            'delete_account_generated_on' => date('Y-m-d H:i:s'),
-
 
270
            'updated_on' => new Expression('NOW()')
-
 
271
        ];
-
 
272
        
-
 
273
        $update = $this->sql->update(self::_TABLE);
-
 
274
        $update->set($values);
-
 
275
        $update->where->equalTo('id', $user_id);
-
 
276
        
-
 
277
        return $this->executeUpdate($update);
Línea 256... Línea 278...
256
    }
278
    }
257
    
279
    
258
 
280
 
Línea 333... Línea 355...
333
     */
355
     */
334
    public function update($user)
356
    public function update($user)
335
    {
357
    {
336
        $hydrator = new ObjectPropertyHydrator();
358
        $hydrator = new ObjectPropertyHydrator();
337
        $values = $hydrator->extract($user);
359
        $values = $hydrator->extract($user);
338
        $value = $this->removeEmpty($values);
360
        //$values = $this->removeEmpty($values);
339
        
361
 
-
 
362
 
-
 
363
        unset($values['added_on']);
340
        $values['updated_on'] = new Expression('NOW()') ;
364
        $values['updated_on'] = new Expression('NOW()') ;
Línea 341... Línea 365...
341
        
365
        
342
        $update = $this->sql->update(self::_TABLE);
366
        $update = $this->sql->update(self::_TABLE);
343
        $update->set($values);
367
        $update->set($values);
Línea -... Línea 368...
-
 
368
        $update->where->equalTo('id',$user->id);
-
 
369
        
344
        $update->where->equalTo('id',$user->id);
370
        //echo $update->getSqlString($this->adapter->platform); exit;
345
        
371
        
Línea 346... Línea 372...
346
        return $this->executeUpdate($update);
372
        return $this->executeUpdate($update);
347
    }
373
    }