1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-25 05:22:59 +00:00

Bugfix: Correctly display whether the user's email address is verified

This commit is contained in:
Starbeamrainbowlabs 2020-01-05 21:10:35 +00:00
parent 0be001990f
commit 3c47bf0539
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 12 additions and 11 deletions

View file

@ -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": []
},

View file

@ -67,7 +67,7 @@ register_module([
$content .= " <input type='email' id='email-address' name='email-address' placeholder='e.g. bob@bobsrockets.com' value='{$env->user_data->emailAddress}' />\n";
$content .= " <p><small>Used to send you notifications etc. Never shared with anyone except $settings->admindetails_name, $settings->sitename's administrator.</small></p>\n";
if($settings->email_user_verify) {
$content .= " <p>Email verification status: <strong>".(empty($env->user_data->emailAddressVerificationCode) ? "not " : "")."verified</strong> <small><em>(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)</em></small></p>";
$content .= " <p>Email verification status: <strong>".(empty($env->user_data->emailAddressVerified) ? "not " : "")."verified</strong> <small><em>(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)</em></small></p>";
}
$content .= " <input type='submit' value='Save Preferences' />\n";
$content .= "</form>\n";
@ -190,7 +190,7 @@ register_module([
}
header("x-status: success");
exit(page_renderer::render_main("Email Address Verified - $settings->sitename", "<p>Your email address was verified successfully. <a href='index.php'>Go to the main page</p>, or <a href='?action=user-preferences'>to your user preferences</a> to make further changes.</p>"));
exit(page_renderer::render_main("Email Address Verified - $settings->sitename", "<p>Your email address was verified successfully. <a href='index.php'>Go to the main page</a>, or to your <a href='?action=user-preferences'>user preferences</a> to make further changes.</p>"));
});
/**
@ -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
);
}