-
Notifications
You must be signed in to change notification settings - Fork 11k
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
[8.x] Proxy URL Generation in VerifyEmail
#34572
Conversation
…chanism in `ResetPassword`. This change increases interface consistency in the Notifications namespace. This change does not break compatability, as it adds a way to overwrite URL generation. If the developer does not provide a callback, the current URL generation is still used.
@@ -11,6 +11,13 @@ | |||
|
|||
class VerifyEmail extends Notification | |||
{ | |||
/** | |||
* The callback that should be used to create the reset password URL. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
); | ||
if (static::$createUrlCallback) { | ||
return call_user_func(static::$createUrlCallback, $notifiable); | ||
} else { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just kept it the same as it is written in ResetPassword::toMail
, hence the else
. I agree that it is not necessary...
} | ||
|
||
/** | ||
* Set a callback that should be used when creating the reset password button URL. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
VerifyEmail
VerifyEmail
This is in relation to issue #28469 and idea #1635.
Provide a mechanism to create URLs in
VerifyEmail
similar to the mechanism inResetPassword
. This change increases interface consistency in the Notifications namespace. This change does not break compatability, as it adds a way to overwrite URL generation. If the developer does not provide a callback, the current URL generation is still used.(Would I need to PR against 7.x if I wanted to propose a backport to the 7.x branch?)