@@ -26,9 +26,9 @@ |
||
| 26 | 26 | $filter = '(&(businesscategory=E*)(displayname=*' . $keyword . '*))'; |
| 27 | 27 | $res = []; |
| 28 | 28 | |
| 29 | - foreach($this->ldap($filter, ['displayname', 'uid']) as $student) { |
|
| 29 | + foreach ($this->ldap($filter, ['displayname', 'uid']) as $student) { |
|
| 30 | 30 | if ($student['uid'][0] != null) |
| 31 | - $res += [ $student['uid'][0] => $student['displayname'][0] ]; |
|
| 31 | + $res += [$student['uid'][0] => $student['displayname'][0]]; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | return $this->json($response, $res); |
@@ -27,8 +27,9 @@ |
||
| 27 | 27 | $res = []; |
| 28 | 28 | |
| 29 | 29 | foreach($this->ldap($filter, ['displayname', 'uid']) as $student) { |
| 30 | - if ($student['uid'][0] != null) |
|
| 31 | - $res += [ $student['uid'][0] => $student['displayname'][0] ]; |
|
| 30 | + if ($student['uid'][0] != null) { |
|
| 31 | + $res += [ $student['uid'][0] => $student['displayname'][0] ]; |
|
| 32 | + } |
|
| 32 | 33 | } |
| 33 | 34 | |
| 34 | 35 | return $this->json($response, $res); |