There was an error while loading. Please reload this page.
1 parent 4889b05 commit 546a8c1Copy full SHA for 546a8c1
1 file changed
src/AppBundle/Ldap/Normalizer.php
@@ -21,15 +21,19 @@ public function denormalizeUsers(array $users)
21
for ($i = 0; $i < $users['count']; $i++) {
22
$user = $users[$i];
23
24
+ $annotations = [];
25
+
26
+ if (isset($user['mail'][0])) {
27
+ $annotations['email'] = $user['mail'][0];
28
+ }
29
30
$result[] = new User(
31
null,
32
$user['dn'],
33
$user['givenname'][0],
34
$user['sn'][0],
35
$user['uid'][0],
- [
- 'email' => isset($user['mail'][0]) ? $user['mail'][0] : ''
- ]
36
+ $annotations
37
);
38
}
39
0 commit comments