diff --git a/app/blueprints/users/account.py b/app/blueprints/users/account.py index 256b4c6..12e0130 100644 --- a/app/blueprints/users/account.py +++ b/app/blueprints/users/account.py @@ -139,8 +139,7 @@ def handle_register(form): send_anon_email.delay(form.email.data, "Email already in use", "We were unable to create the account as the email is already in use by {}. Try a different email address.".format( user_by_email.display_name)) - flash("Check your email address to verify your account", "success") - return redirect(url_for("homepage.home")) + return redirect(url_for("flatpage", path="email_sent")) elif EmailSubscription.query.filter_by(email=form.email.data, blacklisted=True).count() > 0: flash("That email address has been unsubscribed/blacklisted, and cannot be used", "danger") return @@ -165,8 +164,7 @@ def handle_register(form): send_verify_email.delay(form.email.data, token) - flash("Check your email address to verify your account", "success") - return redirect(url_for("homepage.home")) + return redirect(url_for("flatpage", path="email_sent")) @bp.route("/user/register/", methods=["GET", "POST"]) @@ -212,13 +210,20 @@ def forgot_password(): We were unable to perform the password reset as we could not find an account associated with this email.

+

+ This may be because you used another email with your account, or because you never + confirmed your email. +

+

+ You can use GitHub to log in if it is associated with your account. + Otherwise, you may need to contact rubenwardy for help. +

If you weren't expecting to receive this email, then you can safely ignore it.

""") - flash("Check your email address to continue the reset", "success") - return redirect(url_for("homepage.home")) + return redirect(url_for("flatpage", path="email_sent")) return render_template("users/forgot_password.html", form=form) @@ -370,8 +375,7 @@ def unsubscribe_verify(): db.session.commit() send_unsubscribe_verify.delay(form.email.data) - flash("Check your email address to continue the unsubscribe", "success") - return redirect(url_for("homepage.home")) + return redirect(url_for("flatpage", path="email_sent")) return render_template("users/unsubscribe.html", form=form) diff --git a/app/blueprints/users/settings.py b/app/blueprints/users/settings.py index 6e9bc87..2faf01a 100644 --- a/app/blueprints/users/settings.py +++ b/app/blueprints/users/settings.py @@ -146,10 +146,8 @@ def handle_email_notifications(user, prefs: UserNotificationPreferences, is_new, db.session.add(ver) db.session.commit() - flash("Check your email to confirm it", "success") - send_verify_email.delay(newEmail, token) - return redirect(url_for("users.email_notifications", username=user.username)) + return redirect(url_for("flatpage", path="email_sent")) db.session.commit() return redirect(url_for("users.email_notifications", username=user.username)) diff --git a/app/flatpages/email_sent.md b/app/flatpages/email_sent.md new file mode 100644 index 0000000..43973e5 --- /dev/null +++ b/app/flatpages/email_sent.md @@ -0,0 +1,7 @@ +title: Check your email +toc: False + +We've sent an email to the address you specified. +You'll need to click the link in the email to confirm it + +My email never arrived \ No newline at end of file diff --git a/app/flatpages/help.md b/app/flatpages/help.md index 975f8c8..66d07eb 100644 --- a/app/flatpages/help.md +++ b/app/flatpages/help.md @@ -1,8 +1,10 @@ title: Help toc: False + ## General Help +* [Frequently Asked Questions](faq) * [Content Ratings and Flags](content_flags) * [Non-free Licenses](non_free) * [Why WTFPL is a terrible license](wtfpl) diff --git a/app/flatpages/help/faq.md b/app/flatpages/help/faq.md new file mode 100644 index 0000000..54ef910 --- /dev/null +++ b/app/flatpages/help/faq.md @@ -0,0 +1,50 @@ +title: Frequently Asked Questions + +## Users and Logins + +### How do I create an account? + +How you create an account depends on whether you have a forum account. + +If you have a forum account, then you'll need to prove that you are the owner of the account. This can +be done using a GitHub account or a random string in your forum account signature. + +If you don't, then you can just sign up using an email address and password. + +GitHub can only be used to login, not to register. + +Register + + +### My verification email never arrived + +There are a number of reasons this may have happened: + +* Incorrect email address entered. +* Temporary problem with ContentDB. +* Email has been unsubscribed. + +If the email doesn't arrive after registering by email, then you'll need to try registering again in 12 hours. +Unconfirmed accounts are deleted every 12 hours. + +If the email verification was sent using the Email settings tab, then you can just set a new email. + +If you have previously unsubscribed this email, then ContentDB is completely prevented from sending emails to that +address. You'll need to use a different email address, or [contact an admin](https://rubenwardy.com/contact/) to +remove your email from the blacklist. + + +## Packages + +### How can I create releases automatically? + +There are a number of methods: + +* [Git Update Detection](update_config): ContentDB will check your Git repo daily, and create updates or send you notifications. +* [Webhooks](release_webhooks): you can configure your Git host to send a webhook to ContentDB, and create an update immediately. +* the [API](api): This is especially powerful when combined with CI/CD and other API endpoints. + + +## How do I get help? + +Please [contact rubenwardy](https://rubenwardy.com/contact/). \ No newline at end of file