Fix unlink function
This commit is contained in:
@@ -168,6 +168,10 @@ class User {
|
|||||||
$stmt2->bindParam(":partner_id", $partner_id);
|
$stmt2->bindParam(":partner_id", $partner_id);
|
||||||
$stmt2->execute();
|
$stmt2->execute();
|
||||||
|
|
||||||
|
// 2. On repasse TOUS leurs films en mode perso (is_common = 0)
|
||||||
|
$stmt = $this->db->prepare("UPDATE movies SET is_common = 0 WHERE user_id IN (?, ?)");
|
||||||
|
$stmt->execute([$userId, $partnerId]);
|
||||||
|
|
||||||
$this->conn->commit();
|
$this->conn->commit();
|
||||||
return ["success" => true, "message" => "Comptes déliés avec succès."];
|
return ["success" => true, "message" => "Comptes déliés avec succès."];
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user