Skip to content

Add registration page#3384

Merged
ildyria merged 4 commits intomasterfrom
registration-page
Jun 7, 2025
Merged

Add registration page#3384
ildyria merged 4 commits intomasterfrom
registration-page

Conversation

@ildyria
Copy link
Copy Markdown
Member

@ildyria ildyria commented May 29, 2025

This pull request introduces a new user registration feature and includes related updates to configuration, validation, and localization. The changes also include renaming configuration keys for clarity and adding support for enabling or disabling user registration through a configuration setting.

New User Registration Feature:

  • app/Http/Controllers/ProfileController.php: Added a register method to handle new user registration, including user creation, validation, and automatic login.
  • app/Http/Requests/Profile/RegistrationRequest.php: Introduced a new request class for validating registration data, with rules for username, email, and password.
  • app/Contracts/Http/Requests/HasEmail.php and app/Http/Requests/Traits/HasEmailTrait.php: Added an interface and trait for handling email attributes in requests. [1] [2]

Configuration Updates:

Localization:

  • Updated multiple language files (e.g., lang/en/profile.php, lang/de/profile.php, lang/fr/profile.php) to include translations for registration-related messages such as "Sign Up" and "Your account has been successfully created." [1] [2] [3] and others)

Minor Adjustments:

@ildyria ildyria added the Review: easy Easy review expected: probably just need a quick to go through. label May 29, 2025
@ildyria ildyria marked this pull request as ready for review May 29, 2025 22:55
@ildyria ildyria requested a review from a team as a code owner May 29, 2025 22:55
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.02%. Comparing base (80b9ad0) to head (deda547).
Report is 9 commits behind head on master.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ildyria ildyria force-pushed the registration-page branch from f298319 to eff1941 Compare June 1, 2025 20:04
const errorMessage = ref("");

const confirmationError = computed(() => {
return password.value !== passwordConfirmation.value ? trans("profile.register.password_mismatch") : "";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here a bool would be the better return and then maybe a second computed for the error message

@tinohager
Copy link
Copy Markdown
Contributor

What is still missing is the double opt-in logic where a mail is sent to ensure that the e-mail address also belongs to the user who registers with it

@ildyria
Copy link
Copy Markdown
Member Author

ildyria commented Jun 6, 2025

What is still missing is the double opt-in logic where a mail is sent to ensure that the e-mail address also belongs to the user who registers with it

Agreed, but given the size of the review team, it is better to make small and easy to review Pr.
This is why I did not dig into the logic. :)

Comment thread resources/js/views/RegisterPage.vue Outdated
.then(() => {
errorMessage.value = ""; // Clear error message on success
toast.add({ severity: "success", summary: trans("profile.register.success"), life: 3000 });
router.push({ name: "gallery" }); // Redirect to gallery
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushing to gallery here without a refresh still shows sign up / sign in buttons.

Is there a way to trigger a redirect and a refresh?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll dig into that.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is weird, because server side we do the login.

@ildyria ildyria merged commit 5d07d34 into master Jun 7, 2025
35 checks passed
@ildyria ildyria deleted the registration-page branch June 7, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review: easy Easy review expected: probably just need a quick to go through.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants