Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'remotes/origin/master' into feature/app…
…-user-registration * remotes/origin/master: (23 commits) Adds credentials to user seeder Adds tests for more login scenarios Fixes problem with password_verify() and hhvm Implements additinonal token assertions Adds method to get source from specified message Updates getLastMessage() to get complete message data Removes unnecessary setUp() method Uses the responder for the reset password response Allow customization of the status code for noContent Moves the dispatch mail logic from repository to controller Sets the sync driver as default, correctly this time Updates API documentation Restores previous driver after test finishes Restores to explicitly set the queue driver to sync Sets travis env to use sync queue driver as default Sets synchronous as default queue driver for phpunit Adds the DispatchesJob declaration Use synchronous queue driver so we can test email queue jobs. Adds assertion for email being sent Implements accessor for full name attribute ...
- Loading branch information
Showing
14 changed files
with
262 additions
and
12 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php namespace App\Jobs; | ||
|
||
use App\Models\User; | ||
use Illuminate\Contracts\Mail\Mailer; | ||
use Illuminate\Contracts\Bus\SelfHandling; | ||
use Illuminate\Contracts\Queue\ShouldQueue; | ||
|
||
class SendPasswordResetEmail extends Job implements SelfHandling, ShouldQueue | ||
{ | ||
/** | ||
* User to email. | ||
* | ||
* @var \App\Models\User | ||
*/ | ||
protected $user; | ||
|
||
/** | ||
* Token for confirmation. | ||
* | ||
* @var string | ||
*/ | ||
protected $token; | ||
|
||
/** | ||
* Create a new job instance. | ||
* | ||
* @param User $user | ||
* @param string $token | ||
* @return void | ||
*/ | ||
public function __construct(User $user, $token) | ||
{ | ||
$this->user = $user; | ||
$this->token = $token; | ||
} | ||
|
||
/** | ||
* Execute the job. | ||
* | ||
* @param Mailer $mailer | ||
* @return void | ||
*/ | ||
public function handle(Mailer $mailer) | ||
{ | ||
$mailer->send('emails.resetPassword', [ | ||
'user' => $this->user, | ||
'token' => $this->token | ||
], function ($m) { | ||
$m->to($this->user->email, $this->user->full_name) | ||
->subject('Password Reset'); | ||
}); | ||
} | ||
} |
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
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,5 @@ | ||
{{ $user->first_name }}, | ||
|
||
Please reset your password by following this link | ||
|
||
http://somelink/{{ $token }} |
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.