-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix password resetting page (#3156)
- Loading branch information
Showing
16 changed files
with
188 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
namespace App\Notifications; | ||
|
||
use App\Models\User\User; | ||
use Illuminate\Support\Facades\App; | ||
use Illuminate\Notifications\Messages\MailMessage; | ||
|
||
class EmailMessaging | ||
{ | ||
/** | ||
* Get the mail representation to verify an email. | ||
* | ||
* @param User $user | ||
* @return MailMessage | ||
*/ | ||
public static function verifyEmailMail(User $user, $verificationUrl) : MailMessage | ||
{ | ||
App::setLocale($user->locale); | ||
|
||
return (new MailMessage) | ||
->subject(trans('mail.confirmation_email_title')) | ||
->line(trans('mail.confirmation_email_title')) | ||
->line(trans('mail.confirmation_email_intro')) | ||
->action(trans('mail.confirmation_email_button'), $verificationUrl) | ||
->line(trans('mail.confirmation_email_bottom')); | ||
} | ||
|
||
/** | ||
* Get the mail representation to reset a password. | ||
* | ||
* @param User $user | ||
* @return MailMessage | ||
*/ | ||
public static function resetPasswordMail(User $user, $token) : MailMessage | ||
{ | ||
App::setLocale($user->locale); | ||
|
||
return (new MailMessage) | ||
->subject(trans('mail.password_reset_title')) | ||
->line(trans('mail.password_reset_title')) | ||
->line(trans('mail.password_reset_intro')) | ||
->action(trans('mail.password_reset_button'), url(config('app.url').route('password.reset', ['token' => $token, 'email' => $user->getEmailForPasswordReset()], false))) | ||
->line(trans('mail.password_reset_expiration', ['count' => config('auth.passwords.'.config('auth.defaults.passwords').'.expire')])) | ||
->line(trans('mail.password_reset_bottom')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.