Fix possibili email non individuate

This commit is contained in:
Thomas Zilio 2019-10-15 16:28:48 +02:00
parent 1b5756c438
commit 57f8c08d72
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,8 @@ use Modules\Emails\Template;
$database->query('ALTER TABLE `zz_operations` DROP FOREIGN KEY `zz_operations_ibfk_3`');
$logs = $database->fetchArray("SELECT * FROM `zz_operations` WHERE `op` = 'send-email'");
$database->query('UPDATE `zz_operations` SET `id_email` = NULL');
foreach ($logs as $log) {
$user = User::find($log['id_utente']);
$template = Template::find($log['id_email']);