From 1b180ce88666ac1c8fab80f22fad9912eb7ae4b3 Mon Sep 17 00:00:00 2001
From: Guillaume Rousse <guillaume.rousse@renater.fr>
Date: Mon, 7 May 2018 14:14:22 +0200
Subject: [PATCH] return a list, not a string, for multi-valued attributes

---
 lib/AccountManager/Account.pm | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/AccountManager/Account.pm b/lib/AccountManager/Account.pm
index f89f120..61e05d7 100644
--- a/lib/AccountManager/Account.pm
+++ b/lib/AccountManager/Account.pm
@@ -138,16 +138,14 @@ sub eduPersonAffiliation {
     my ($self) = @_;
     my $affiliations = $affiliation{$self->profile()} || [];
 
-    return join(', ', @$affiliations);
+    return @$affiliations;
 }
 
 sub eduPersonScopedAffiliation {
     my ($self) = @_;
     my $affiliations = $scopedAffiliation{$self->profile()} || [];
 
-    $affiliations = [ map { $_ . '@' . $self->{scope} } @$affiliations ];
-
-    return join(', ', @$affiliations);
+    return map { $_ . '@' . $self->{scope} } @$affiliations;
 }
 
 sub eduPersonPrincipalName {
-- 
GitLab