Fixes deletion of people inscriptions in events (Closes #1578)
[platal.git] / modules / register.php
index 9cd2cae..990dee8 100644 (file)
@@ -276,7 +276,9 @@ class RegisterModule extends PLModule
 
         $_SESSION['subState'] = $subState->dict();
         if (count($alert)) {
-            $alert_details = "Détails des alertes :" . $alert_details . "\n\n\n";
+            $alert_details = "Détails des alertes :" . $alert_details . "\n\n";
+            $alert_details .= 'Compte concerné : ' . $subState->s('forlife') . ' (redirection vers : '
+                           . ($subState->s('email') == '' ? Post::t('email') : $subState->s('email')). ")\n\n\n";
             send_warning_mail(implode(' - ', $alert), $alert_details);
         }
 
@@ -459,9 +461,9 @@ class RegisterModule extends PLModule
 
         // Notify other users which were watching for her arrival.
         XDB::execute('INSERT INTO  contacts (uid, contact)
-                           SELECT  uid, ni_id
+                           SELECT  uid, {?}
                              FROM  watch_nonins
-                            WHERE  ni_id = {?}', $uid);
+                            WHERE  ni_id = {?}', $pid, $uid);
         XDB::execute('DELETE FROM  watch_nonins
                             WHERE  ni_id = {?}', $uid);
         Platal::session()->updateNbNotifs();