Browse code

Changed majority of files.

DoubleBastionAdmin authored on 30/11/2024 06:56:40
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,36 @@
1
+<?php
2
+/**
3
+ *  Copyright (C) 2022, 2024  Double Bastion LLC
4
+ *
5
+ *  This file is part of Roundpin, which is licensed under the
6
+ *  GNU Affero General Public License Version 3.0. The license terms
7
+ *  are detailed in the "LICENSE.txt" file located in the root directory.
8
+ */
9
+
10
+session_start();
11
+
12
+if (isset($_POST['s_ajax_call']) && ($_POST['s_ajax_call'] == $_SESSION['validate_s_access'])) {
13
+
14
+ define('ACCESSCONST', TRUE);
15
+
16
+ require('db-connect.php');
17
+
18
+    $username = $_POST['username'];
19
+
20
+    // Close Roundpin user account
21
+    $enabled = 0;
22
+    $closeacquery = $mysqli->prepare("UPDATE app_users SET enabled = ? WHERE username = ?");
23
+    $closeacquery->bind_param("is", $enabled, $username);
24
+    $closeacquery->execute();
25
+
26
+    if ($closeacquery) {
27
+        $closeaccountmessage = "Your Roundpin user account has been closed successfully!";
28
+    } else { $closeaccountmessage = "An error occurred while attempting to close your user account! Please talk to the system administrator about this issue."; }
29
+
30
+    echo json_encode($closeaccountmessage);
31
+
32
+} else {
33
+    header("Location: ../login.php");
34
+}
35
+
36
+?>