Skip to content

Commit 22710af

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents afb7fa2 + 968f8fb commit 22710af

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/Http/Controllers/ProfileController.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use App\Http\Requests\ImageUploadRequest;
66
use App\Models\Setting;
7-
use Auth;
7+
use Illuminate\Support\Facades\Auth;
88
use Gate;
99
use Illuminate\Http\Request;
1010
use Illuminate\Support\Facades\Hash;
@@ -133,7 +133,7 @@ public function api()
133133
public function password()
134134
{
135135
$user = Auth::user();
136-
136+
137137
return view('account/change-password', compact('user'));
138138
}
139139

@@ -186,6 +186,9 @@ public function passwordSave(Request $request)
186186
if (! $validator->fails()) {
187187
$user->password = Hash::make($request->input('password'));
188188
$user->save();
189+
190+
// Log the user out of other devices
191+
Auth::logoutOtherDevices($request->input('password'));
189192
return redirect()->route('account.password.index')->with('success', 'Password updated!');
190193

191194
}

app/Http/Kernel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class Kernel extends HttpKernel
4343
\App\Http\Middleware\CheckForTwoFactor::class,
4444
\Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,
4545
\App\Http\Middleware\AssetCountForSidebar::class,
46+
\Illuminate\Session\Middleware\AuthenticateSession::class,
4647
],
4748

4849
'api' => [

0 commit comments

Comments
 (0)