Skip to content

Commit fa3f588

Browse files
committed
Laravel 8.0
1 parent e086c71 commit fa3f588

File tree

5 files changed

+24
-5
lines changed

5 files changed

+24
-5
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ matrix:
3030
env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-lowest'
3131
- php: 7.4
3232
env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable'
33+
- php: 7.3
34+
env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-lowest'
35+
- php: 7.3
36+
env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-stable'
37+
- php: 7.4
38+
env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-lowest'
39+
- php: 7.4
40+
env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-stable'
3341
fast_finish: true
3442

3543
before_install:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `laravel-verify-new-email` will be documented in this file
44

5+
## 1.2.0 - 2020-09-04
6+
7+
- support for Laravel 8.0
8+
59
## 1.1.0 - 2020-03-03
610

711
- support for Laravel 7.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Quality Score](https://img.shields.io/scrutinizer/g/protonemedia/laravel-verify-new-email.svg?style=flat-square)](https://scrutinizer-ci.com/g/protonemedia/laravel-verify-new-email)
66
[![Total Downloads](https://img.shields.io/packagist/dt/protonemedia/laravel-verify-new-email.svg?style=flat-square)](https://packagist.org/packages/protonemedia/laravel-verify-new-email)
77

8-
Laravel supports verifying email addresses out of the box. This package adds support for verifying *new* email addresses. When a user updates its email address, it won't replace the old one until the new one is verified. Super easy to set up, still fully customizable. If you want it can be used as a drop-in replacement for the built-in Email Verification features as this package supports unauthenticated verification and auto-login. Support for Laravel 6.0 and 7.0 and requires PHP 7.2 or higher.
8+
Laravel supports verifying email addresses out of the box. This package adds support for verifying *new* email addresses. When a user updates its email address, it won't replace the old one until the new one is verified. Super easy to set up, still fully customizable. If you want it can be used as a drop-in replacement for the built-in Email Verification features as this package supports unauthenticated verification and auto-login. Support for Laravel 6.0 and higher and requires PHP 7.2 or higher.
99

1010
## Blogpost
1111

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
],
1818
"require": {
1919
"php": "^7.2",
20-
"illuminate/support": "^6.0 || ^7.0"
20+
"illuminate/support": "^6.0 || ^7.0 || ^8.0"
2121
},
2222
"require-dev": {
23-
"orchestra/testbench": "^4.0 || ^5.0",
23+
"orchestra/testbench": "^4.0 || ^5.0 || ^6.0",
2424
"phpunit/phpunit": "^8.0"
2525
},
2626
"autoload": {

src/Http/VerifiesPendingEmails.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
namespace ProtoneMedia\LaravelVerifyNewEmail\Http;
44

5-
use Illuminate\Support\Facades\Auth;
5+
use Illuminate\Foundation\Auth\AuthenticatesUsers;
66

77
trait VerifiesPendingEmails
88
{
9+
use AuthenticatesUsers;
10+
911
/**
1012
* Mark the user's new email address as verified.
1113
*
@@ -24,9 +26,14 @@ public function verify(string $token)
2426
})->user;
2527

2628
if (config('verify-new-email.login_after_verification')) {
27-
Auth::guard()->login($user, config('verify-new-email.login_remember'));
29+
return $this->guard()->login($user, config('verify-new-email.login_remember'));
2830
}
2931

32+
return $this->authenticated();
33+
}
34+
35+
protected function authenticated()
36+
{
3037
return redirect(config('verify-new-email.redirect_to'))->with('verified', true);
3138
}
3239
}

0 commit comments

Comments
 (0)