Merge pull request #10 from spacejewel-hosting/translate

Force new users to verify email
This commit is contained in:
Miguel Nogueira 2020-09-03 20:22:11 +01:00 committed by GitHub
commit 04838048ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -7,11 +7,10 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notifiable;
use Spatie\Permission\Traits\HasRoles; use Spatie\Permission\Traits\HasRoles;
class User extends Authenticatable class User extends Authenticatable implements MustVerifyEmail
{ {
use Notifiable; use Notifiable;
use HasRoles; use HasRoles;
//use MustVerifyEmail;
/** /**
* The attributes that are mass assignable. * The attributes that are mass assignable.

View File

@ -17,7 +17,7 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
Route::group(['prefix' => 'auth', 'middleware' => ['usernameUUID']], function (){ Route::group(['prefix' => 'auth', 'middleware' => ['usernameUUID']], function (){
Auth::routes(); Auth::routes(['verify' => true]);
Route::post('/twofa/authenticate', 'Auth\TwofaController@verify2FA') Route::post('/twofa/authenticate', 'Auth\TwofaController@verify2FA')
->name('verify2FA'); ->name('verify2FA');
@ -31,7 +31,7 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
->name('sendSubmission'); ->name('sendSubmission');
Route::group(['middleware' => ['auth', 'forcelogout', '2fa']], function(){ Route::group(['middleware' => ['auth', 'forcelogout', '2fa', 'verified']], function(){
Route::get('/dashboard', 'DashboardController@index') Route::get('/dashboard', 'DashboardController@index')
->name('dashboard') ->name('dashboard')