Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

Commit 8bc4915

Browse files
committed
Remove impersonate action
1 parent 924865d commit 8bc4915

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

resources/views/partials/layouts/header.blade.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@
4747
</li>
4848
<li class="divider"></li>
4949
<li><a href="{{ url('/') }}" target="_blank">{{ __('Preview website') }}</a></li>
50-
@if ($profile->isSuperUser())
51-
<li><a href="{{ route('shopper.users.impersonate') }}" target="_blank">{{ __('Impersonate user') }}</a></li>
52-
@endif
5350
<li><a href="{{ route('shopper.settings.translate.index') }}">{{ __('Backend Preferences') }}</a></li>
5451
<li class="divider"></li>
5552
<li>

src/Plugins/Users/Http/Controllers/UserController.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -180,25 +180,6 @@ public function addresses(int $id)
180180
return $user->addresses;
181181
}
182182

183-
/**
184-
* Impersonate user
185-
*
186-
* @return \Illuminate\Http\RedirectResponse
187-
*/
188-
public function impersonate()
189-
{
190-
$user = $this->repository->getModel()->first();
191-
192-
if ($user) {
193-
Auth::login($user);
194-
195-
return redirect(url('/'))->with('status', __("Impersonate as {$user->name}"));
196-
} else {
197-
return redirect()->route('shopper.users.index')
198-
->with('warning', __('There is no user you can impersonate'));
199-
}
200-
}
201-
202183
/**
203184
* @param int $id
204185
* @return \Illuminate\Database\Eloquent\Collection

0 commit comments

Comments
 (0)