Guillermo - path / staff/add[skip ci]

This commit is contained in:
AntonyAntonio 2016-12-06 01:32:00 -03:00
parent 8dd11af96b
commit b2547ce5f8
1 changed files with 14 additions and 0 deletions

View File

@ -14,6 +14,20 @@ class GetStaffController extends Controller {
public function handler() {
$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 = [];
$departmentList = $user->sharedDepartmentList;