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

fix: do not send confirm email when signup_double_optin is false #1794

Merged
merged 6 commits into from
Sep 12, 2018

Conversation

asbiin
Copy link
Member

@asbiin asbiin commented Sep 8, 2018

No description provided.

Copy link
Member

@djaiss djaiss left a comment

Choose a reason for hiding this comment

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

Also, don't forget the test for the service ;-)

throw new MissingParameterException('Missing parameters');
}

$user = auth()->user();
Copy link
Member

Choose a reason for hiding this comment

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

I don't think it's a good idea that you use auth()->user() in a service. This assumes that we call the service in the context where we are authenticated which might not be always the case.

Instead, you need to pass the user id as a parameter and then find the user, etc...

More DB queries but at least, the service is not dependant on something else.

@asbiin
Copy link
Member Author

asbiin commented Sep 10, 2018

Also, don't forget the test for the service ;-)

Yes that was my intention ;)

@asbiin
Copy link
Member Author

asbiin commented Sep 11, 2018

@djaiss tests done!

@asbiin asbiin merged commit b350757 into master Sep 12, 2018
@asbiin asbiin deleted the fix/not-send-confirmemail branch September 12, 2018 05:58
@github-actions
Copy link

github-actions bot commented Feb 1, 2021

This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants