summaryrefslogtreecommitdiff
path: root/public/account
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-05-09 18:15:54 +0500
committerilotterytea <iltsu@alright.party>2025-05-09 18:15:54 +0500
commitbe2912e26bdf1843c3a91fc0717b301f168d4962 (patch)
tree5d8cd5c81f01449ff10022d1e313f68838abcf0c /public/account
parent84458ca14672d25514970a7ab596cb2e4ff269d6 (diff)
feat: option to log user actions
Diffstat (limited to 'public/account')
-rw-r--r--public/account/index.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/public/account/index.php b/public/account/index.php
index 7bb19f5..48bfb8d 100644
--- a/public/account/index.php
+++ b/public/account/index.php
@@ -144,14 +144,16 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
<input type="password" name="password-new" id="form-password-new">
</div>
<div>
- <input type="checkbox" name="hide-actions" value="1" id="form-hide-actions" <?php
- $stmt = $db->prepare("SELECT hide_actions FROM user_preferences WHERE id = ?");
- $stmt->execute([$_SESSION["user_id"]]);
- if (intval($stmt->fetch()[0]) == 1) {
- echo 'checked';
- }
- ?>>
- <label for="hide-actions" class="inline">Hide actions</label>
+ <?php if (ACCOUNT_LOG_ACTIONS): ?>
+ <input type="checkbox" name="hide-actions" value="1" id="form-hide-actions" <?php
+ $stmt = $db->prepare("SELECT hide_actions FROM user_preferences WHERE id = ?");
+ $stmt->execute([$_SESSION["user_id"]]);
+ if (intval($stmt->fetch()[0]) == 1) {
+ echo 'checked';
+ }
+ ?>>
+ <label for="hide-actions" class="inline">Hide actions</label>
+ <?php endif; ?>
</div>
<div>
<input type="checkbox" name="signout-everywhere" value="1" id="form-signout-everywhere">