From 3c47bf05395f0a06c8158d99959d1086fb30b213 Mon Sep 17 00:00:00 2001
From: Starbeamrainbowlabs
Date: Sun, 5 Jan 2020 21:10:35 +0000
Subject: [PATCH] Bugfix: Correctly display whether the user's email address is
verified
---
module_index.json | 16 ++++++++--------
modules/feature-user-preferences.php | 7 ++++---
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/module_index.json b/module_index.json
index e35c29b..50f5910 100755
--- a/module_index.json
+++ b/module_index.json
@@ -5,7 +5,7 @@
"version": "0.7",
"author": "Starbeamrainbowlabs",
"description": "Adds a utility action (that anyone can use) called hash that hashes a given string. Useful when changing a user's password.",
- "lastupdate": 1549840565,
+ "lastupdate": 1578257948,
"optional": false,
"extra_data": []
},
@@ -45,7 +45,7 @@
"version": "0.1",
"author": "Starbeamrainbowlabs",
"description": "Provides a basic JSON status action that provides a few useful bits of information for API consumption.",
- "lastupdate": 1530565418,
+ "lastupdate": 1578257948,
"optional": false,
"extra_data": []
},
@@ -85,7 +85,7 @@
"version": "0.1.7",
"author": "Starbeamrainbowlabs",
"description": "The module everyone has been waiting for! Adds a web based gui that lets mods change the wiki settings.",
- "lastupdate": 1571583667,
+ "lastupdate": 1578257948,
"optional": false,
"extra_data": []
},
@@ -105,7 +105,7 @@
"version": "0.1.1",
"author": "Starbeamrainbowlabs",
"description": "Adds interwiki link support. Set the interwiki_index_location setting at an index file to activate support.",
- "lastupdate": 1572089223,
+ "lastupdate": 1578257948,
"optional": false,
"extra_data": []
},
@@ -145,7 +145,7 @@
"version": "0.3",
"author": "Starbeamrainbowlabs",
"description": "An extensible statistics calculation system. Comes with a range of built-in statistics, but can be extended by other modules too.",
- "lastupdate": 1575837905,
+ "lastupdate": 1578257948,
"optional": false,
"extra_data": []
},
@@ -165,7 +165,7 @@
"version": "0.6.2",
"author": "Starbeamrainbowlabs",
"description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File\/' prefix.",
- "lastupdate": 1571603165,
+ "lastupdate": 1578257948,
"optional": false,
"extra_data": []
},
@@ -175,7 +175,7 @@
"version": "0.4",
"author": "Starbeamrainbowlabs",
"description": "Adds a user preferences page, letting people do things like change their email address and password.",
- "lastupdate": 1578257835,
+ "lastupdate": 1578258608,
"optional": false,
"extra_data": []
},
@@ -195,7 +195,7 @@
"version": "0.1.2",
"author": "Starbeamrainbowlabs",
"description": "Adds per-user watchlists. When a page on a user's watchlist is edited, a notification email is sent.",
- "lastupdate": 1578255352,
+ "lastupdate": 1578257910,
"optional": false,
"extra_data": []
},
diff --git a/modules/feature-user-preferences.php b/modules/feature-user-preferences.php
index fbd7835..86858f6 100644
--- a/modules/feature-user-preferences.php
+++ b/modules/feature-user-preferences.php
@@ -67,7 +67,7 @@ register_module([
$content .= " \n";
$content .= " Used to send you notifications etc. Never shared with anyone except $settings->admindetails_name, $settings->sitename's administrator.
\n";
if($settings->email_user_verify) {
- $content .= " Email verification status: ".(empty($env->user_data->emailAddressVerificationCode) ? "not " : "")."verified (Email address verification is required in order to receive emails (other than the verification email itself, of course). Click the link in the verification email sent to you to verify your address, or change it here to get another verification email)
";
+ $content .= " Email verification status: ".(empty($env->user_data->emailAddressVerified) ? "not " : "")."verified (Email address verification is required in order to receive emails (other than the verification email itself, of course). Click the link in the verification email sent to you to verify your address, or change it here to get another verification email)
";
}
$content .= " \n";
$content .= "\n";
@@ -190,7 +190,7 @@ register_module([
}
header("x-status: success");
- exit(page_renderer::render_main("Email Address Verified - $settings->sitename", "Your email address was verified successfully. Go to the main page
, or to your user preferences to make further changes.
"));
+ exit(page_renderer::render_main("Email Address Verified - $settings->sitename", "Your email address was verified successfully. Go to the main page , or to your user preferences to make further changes.
"));
});
/**
@@ -330,7 +330,8 @@ function email_user_verify(string $username) : bool {
$settings->sitename requires that you verify your email address in order to use it.
--$settings->sitename
-Powered by Pepperminty Wiki"
+Powered by Pepperminty Wiki",
+ true // ignore that the user's email address isn't verified
);
}