Skip to content

Commit cc234c6

Browse files
Update LdapSync.php to populate/update user fields
Added missing IF statements for address, city, state, and ZIP code. Previously, this information would be pulled via LDAP sync but would not update the user data due to the missing IF statements for these attributes.
1 parent 79f6ddc commit cc234c6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

app/Console/Commands/LdapSync.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,21 @@ public function handle()
317317
if($ldap_map["jobtitle"] != null){
318318
$user->jobtitle = $item['jobtitle'];
319319
}
320+
if($ldap_map["address"] != null){
321+
$user->address = $item['address'];
322+
}
323+
if($ldap_map["city"] != null){
324+
$user->city = $item['city'];
325+
}
326+
if($ldap_map["state"] != null){
327+
$user->state = $item['state'];
328+
}
320329
if($ldap_map["country"] != null){
321330
$user->country = $item['country'];
322331
}
332+
if($ldap_map["zip"] != null){
333+
$user->zip = $item['zip'];
334+
}
323335
if($ldap_map["dept"] != null){
324336
$user->department_id = $department->id;
325337
}

0 commit comments

Comments
 (0)