mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Switch to FtpExport entities
This commit is contained in:
@@ -759,10 +759,14 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
public function delete()
|
||||
{
|
||||
$repo = $this->app['EM']->getRepository('Entities\UsrAuthProvider');
|
||||
|
||||
foreach ($repo->findByUser($this) as $provider) {
|
||||
$this->app['EM']->remove($provider);
|
||||
}
|
||||
|
||||
$repo = $this->app['EM']->getRepository('Entities\FtpExport');
|
||||
foreach ($repo->findByUser($this) as $export) {
|
||||
$this->app['EM']->remove($export);
|
||||
}
|
||||
|
||||
$this->app['EM']->flush();
|
||||
|
||||
@@ -792,11 +796,6 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
$stmt->execute(array(':usr_id' => $this->get_id()));
|
||||
$stmt->closeCursor();
|
||||
|
||||
$sql = 'DELETE FROM ftp_export WHERE usr_id = :usr_id';
|
||||
$stmt = $this->app['phraseanet.appbox']->get_connection()->prepare($sql);
|
||||
$stmt->execute(array(':usr_id' => $this->get_id()));
|
||||
$stmt->closeCursor();
|
||||
|
||||
$sql = 'DELETE FROM `order` WHERE usr_id = :usr_id';
|
||||
$stmt = $this->app['phraseanet.appbox']->get_connection()->prepare($sql);
|
||||
$stmt->execute(array(':usr_id' => $this->get_id()));
|
||||
|
Reference in New Issue
Block a user