@@ -33,8 +33,9 @@ |
||
| 33 | 33 | |
| 34 | 34 | $res = []; |
| 35 | 35 | foreach($students as $student) { |
| 36 | - if ($student['uid'][0] != null) |
|
| 37 | - $res += [ $student['uid'][0] => $student['displayname'][0] ]; |
|
| 36 | + if ($student['uid'][0] != null) { |
|
| 37 | + $res += [ $student['uid'][0] => $student['displayname'][0] ]; |
|
| 38 | + } |
|
| 38 | 39 | } |
| 39 | 40 | |
| 40 | 41 | return $this->json($response, $res); |
@@ -27,9 +27,9 @@ |
||
| 27 | 27 | $students = $this->ldap($filter, ['displayname', 'uid']); |
| 28 | 28 | $res = []; |
| 29 | 29 | |
| 30 | - foreach($students as $student) { |
|
| 30 | + foreach ($students as $student) { |
|
| 31 | 31 | if ($student['uid'][0] != null) |
| 32 | - $res += [ $student['uid'][0] => $student['displayname'][0] ]; |
|
| 32 | + $res += [$student['uid'][0] => $student['displayname'][0]]; |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | return $this->json($response, $res); |
@@ -31,10 +31,10 @@ |
||
| 31 | 31 | array_push($classes, $enrollment->class); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - return $this->view->render($response, 'App/user.twig',[ |
|
| 34 | + return $this->view->render($response, 'App/user.twig', [ |
|
| 35 | 35 | 'classes' => $classes, |
| 36 | 36 | 'student_name' => $this->ldapFirst("uid=$id")['displayname'][0] |
| 37 | - ] ); |
|
| 37 | + ]); |
|
| 38 | 38 | |
| 39 | 39 | } |
| 40 | 40 | |