mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-31 01:35:15 +02:00
Guillermo - path / staff/add[skip ci]
This commit is contained in:
parent
8dd11af96b
commit
b2547ce5f8
@ -14,6 +14,20 @@ class GetStaffController extends Controller {
|
|||||||
|
|
||||||
public function handler() {
|
public function handler() {
|
||||||
$user = Controller::getLoggedUser();
|
$user = Controller::getLoggedUser();
|
||||||
|
|
||||||
|
$userId = Controller::request('userId');
|
||||||
|
$userRow = Staff::getDataStore($userId,'id');
|
||||||
|
|
||||||
|
if($user->level == 3 && !$userRow->isNull()) {
|
||||||
|
Response::respondSuccess([
|
||||||
|
'id' => $userRow->id,
|
||||||
|
'name' => $userRow->name,
|
||||||
|
'email' => $userRow->email,
|
||||||
|
'password' => $userRow->password
|
||||||
|
]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$parsedDepartmentList = [];
|
$parsedDepartmentList = [];
|
||||||
$departmentList = $user->sharedDepartmentList;
|
$departmentList = $user->sharedDepartmentList;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user