mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Filters for users that have been removed
This commit is contained in:
parent
b960a21201
commit
64e2ae0c57
@ -69,6 +69,19 @@ class UserFilters extends QueryFilters
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters users that have been removed from the
|
||||
* company, but not deleted from the system.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function hideRemovedUsers()
|
||||
{
|
||||
return $this->builder->whereHas('company_users', function ($q) {
|
||||
$q->where('company_id', '=', auth()->user()->company()->id)->whereNull('deleted_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the base with() function as no company ID
|
||||
* exists on the user table
|
||||
|
Loading…
x
Reference in New Issue
Block a user