Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#6 - handle registration form #17

Merged
merged 4 commits into from
Mar 11, 2024
Merged

#6 - handle registration form #17

merged 4 commits into from
Mar 11, 2024

Conversation

jsawo
Copy link
Member

@jsawo jsawo commented Mar 8, 2024

Adds registration form handling.
We're using Symfony/Mailer to send emails with a SMTP server provided with .env.
As a consequence, this now depends on PHP.

  • form input is validated
  • validation errors are reported to the user
  • valid form submission results in 2 emails being sent:
    • one email with confirmation to the user that filled the form
    • another - registration notice - to an email configurable in .env

also note:

further steps that we might consider:

  • implement CSRF
  • implement confirmation link sent to users

closes #6

readme.md Show resolved Hide resolved
src/FormValidator.php Outdated Show resolved Hide resolved
public/index.html Show resolved Hide resolved
src/templates/email_registration_confirmation.html Outdated Show resolved Hide resolved
src/RegistrationEmailHandler.php Show resolved Hide resolved
src/RegistrationEmailHandler.php Show resolved Hide resolved
jsawo and others added 2 commits March 11, 2024 07:14
Co-authored-by: Krzysztof Rewak <krzysztof.rewak@blumilk.pl>
@jsawo jsawo merged commit 5be8120 into main Mar 11, 2024
@jsawo jsawo deleted the registration-form branch March 11, 2024 12:05
@mtracz
Copy link
Member

mtracz commented Mar 12, 2024

@krzysztofrewak @jsawo
Why we didn't use framework for this stuff and the whole project? As we can see right now, static site is not 100% static site.

Sending 2 emails in sync mode might take some time. Also receiving registration confirmations on email and manage that wont be easy. For this case I would like to use simple CRUD on the backend.
Using framework will give us more powerful and useful tools, like sends reminders to the registered users, confirm email first to prevent spam from 10 minute mail. Use queue to send emails, and so on.

further steps that we might consider:

implement CSRF
implement confirmation link sent to users

Are we going to reinvent "the wheel" again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sending emails
3 participants