Skip to content

Conversation

@Ferks-FK
Copy link
Collaborator

This PR fixes: #1264.
Note: The Referral notification class is in a new syntax, which was introduced by PR: #1257.
To work, the two PRs must be merged together.

@MrWeez MrWeez added the High Priority Critical. Act quickly for resolution label Aug 23, 2025
@1day2die
Copy link
Collaborator

1day2die commented Nov 6, 2025

@Ferks-FK can you post an update here on github?

@1day2die 1day2die requested a review from Copilot November 6, 2025 22:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the user registration process by extracting referral logic into a dedicated ProcessReferralAction class and modernizing the RegisterController. The refactoring improves code organization by separating concerns and changes the order of operations to create the Pterodactyl account before the local user record, reducing the need for cleanup on failure.

Key changes:

  • Extracted referral processing logic from RegisterController into a new ProcessReferralAction class
  • Modernized property declarations with typed properties and camelCase naming conventions
  • Reordered user creation to occur after successful Pterodactyl API call, eliminating the need for user deletion on API failure

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
app/Http/Controllers/Auth/RegisterController.php Refactored to use typed properties with camelCase naming, changed constructor to use app() helper instead of dependency injection, reordered user creation logic, and delegated referral processing to the new action class
app/Actions/ProcessReferralAction.php New action class that encapsulates referral processing logic including credit rewards, notifications, and database logging

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority Critical. Act quickly for resolution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants