pterodactyl / whmcs

WHMCS Module for Pterodactyl (v0.7.3 and higher)
MIT License
183 stars 77 forks source link

New server purchase by someone with a subuser on panel results in error #129

Closed joker-119 closed 2 months ago

joker-119 commented 1 year ago

Basically the title. If someone makes a server purchase on WHMCS, but that persons email is already tied to a subuser account on the pterodactyl panel, there's an error during server creation. Deleting their subuser account resolves the issue.

TrixterTheTux commented 1 year ago

You’d need to include the actual error as the account already existing shouldn’t affect the module as it checks for that.

joker-119 commented 1 year ago

post - https://panel.exiled.host/api/application/users

{"username":"REDACTED","email":"REDACTED","first_name":"REDACTED","last_name":"REDACTED","external_id":"1114"}
Array
(
    [errors] => Array
        (
            [0] => Array
                (
                    [code] => ValidationException
                    [status] => 422
                    [detail] => The email has already been taken.
                    [meta] => Array
                        (
                            [source_field] => email
                            [rule] => unique
                        )

                )

        )

    [status_code] => 422
)

get - https://panel.exiled.host/api/application/users?filter[email]=REDACTED (returns a long list of some users, but is not a complete list and does not have the user in question on said list)

get - https://panel.exiled.host/api/application/users/external/1114

Array
(
    [errors] => Array
        (
            [0] => Array
                (
                    [code] => NotFoundHttpException
                    [status] => 404
                    [detail] => The requested resource could not be found on the server.
                )

        )

    [status_code] => 404
)
TrixterTheTux commented 1 year ago

This sounds to me like you're running the wrong version of the module for your panel, or it's just fully ignoring ?filter[email]= query string be it due to a different panel version or custom modifications.

joker-119 commented 1 year ago

Panel version 1.10.1, unsure how to check the module version, but this has always been an issue, honestly it just didn't happen enough to be a concern until recently. And it's happened on unmodded panel versions.

joker-119 commented 6 months ago

Still happening, Wings 1.11.8, Panel 1.11.2 (also tried upgrading panel to 1.11.5 and no change)

TrixterTheTux commented 6 months ago

This sounds to me like you're running the wrong version of the module for your panel, or it's just fully ignoring ?filter[email]= query string be it due to a different panel version or custom modifications.

This reply still applies.

joker-119 commented 6 months ago

Imagine, I update everything to the most recent version, and somehow you still think it's because something is outdated. I'm honestly amazed at your logic.

TrixterTheTux commented 6 months ago

Here is my reasoning:

joker-119 commented 6 months ago

Ok well my company is merging with another so in a few weeks when it happens again on a default panel just like it was before I installed a theme, I'll come back to see what the next excuse is.

TrixterTheTux commented 6 months ago

As mentioned before, I'm unable to reproduce this with a stock install of the latest panel version. However, if you have more concrete reproduction steps that I can do to replicate this issue, I would be happy to fix this if it's genuinely an issue with the module.