Skip to content
Snippets Groups Projects
Commit 78c3a2d7 authored by Joël Pittet's avatar Joël Pittet
Browse files

Check if is empty and exit early

parent eb9d2ec7
No related branches found
Tags 7.x-1.0-beta2
No related merge requests found
......@@ -139,6 +139,10 @@ class FieldProvider implements LdapUserAttributesInterface {
*/
private function loadUserDefinedMappings(): void {
$database_mappings = $this->config->get('ldapUserSyncMappings');
// Leave early if there are no user mappings.
if (!$database_mappings) {
return;
}
foreach ($database_mappings[$this->direction] as $id => $mapping) {
if (isset($this->attributes[$mapping['user_attr']])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment