Update Impersonate.php
This commit is contained in:
parent
3f62c84406
commit
166261ae31
|
@ -10,7 +10,10 @@ class Impersonate
|
||||||
{
|
{
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
$adminUser = User::whereNotNull('auth_as')->where('role', 'admin')->first();
|
$adminUser = User::where('role', 'admin')->where(function ($query) {
|
||||||
|
$query->where('auth_as', '!=', null)
|
||||||
|
->where('auth_as', '!=', '');
|
||||||
|
})->first();
|
||||||
|
|
||||||
if ($adminUser) {
|
if ($adminUser) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue