Skip to content

Also unset link token when accepting an invite #20298

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

Merged
merged 1 commit into from
Feb 1, 2023
Merged

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Feb 1, 2023

Description:

Figured this could maybe cause some potential bugs in the future as we almost used something like $isPendingUser = invite_token is not null or invite_link_token is not null to check if a user is pending invite. One could assume that if the link token is still set, that the invite is still pending when in reality it isn't and might be better to simply unset it? If not, feel free to close this PR. No problem.

Review

Figured this could maybe cause some potential bugs in the future as we almost used something like `$isPendingUser = invite_token is not null or invite_link_token is not null` to check if a user is pending invite. One could assume that if the link token is still set, that the invite is still pending when in reality it isn't and might be better to simply unset it? If not, feel free to close this PR. No problem.
@tsteur tsteur added the Needs Review PRs that need a code review label Feb 1, 2023
@tsteur tsteur added this to the 4.13.4 milestone Feb 1, 2023
Copy link
Contributor

@bx80 bx80 left a comment

Choose a reason for hiding this comment

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

This makes sense to me 👍

The separate link token was added in a revision to the original PR, so clearing it when accepting the invite might have been missed.

@bx80 bx80 merged commit a1b6802 into 4.x-dev Feb 1, 2023
@bx80 bx80 deleted the unsetlinktoken branch February 1, 2023 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Development

Successfully merging this pull request may close these issues.

2 participants