Added dept to User API transformer

This commit is contained in:
snipe 2017-05-23 02:48:03 -07:00
parent e9c39add4f
commit b223630f72

View file

@ -32,6 +32,10 @@ class UsersTransformer
'groups' => $user->groups,
'jobtitle' => e($user->jobtitle),
'email' => e($user->email),
'department' => ($user->department) ? [
'id' => (int) $user->department->id,
'name'=> e($user->department->name)
] : null,
'location' => (new LocationsTransformer)->transformLocation($user->userloc),
'permissions' => $user->decodePermissions(),
'activated' => ($user->activated =='1') ? true : false,