Skip to content

Commit

Permalink
Fix stub tests (#1014)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Mar 21, 2022
1 parent b14c1d7 commit 0ae15e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/Http/Livewire/LogoutOtherBrowserSessionsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public function confirmLogout()
*/
public function logoutOtherBrowserSessions(StatefulGuard $guard)
{
if (config('session.driver') !== 'database') {
return;
}

$this->resetErrorBag();

if (! Hash::check($this->password, Auth::user()->password)) {
Expand Down
8 changes: 5 additions & 3 deletions src/Http/Livewire/UpdatePasswordForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ public function updatePassword(UpdatesUserPasswords $updater)

$updater->update(Auth::user(), $this->state);

request()->session()->put([
'password_hash_'.Auth::getDefaultDriver() => Auth::user()->getAuthPassword(),
]);
if (request()->hasSession()) {
request()->session()->put([
'password_hash_'.Auth::getDefaultDriver() => Auth::user()->getAuthPassword(),
]);
}

$this->state = [
'current_password' => '',
Expand Down

0 comments on commit 0ae15e6

Please sign in to comment.