aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CatDap
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CatDap')
-rw-r--r--lib/CatDap/Controller/admin.pm11
-rw-r--r--lib/CatDap/Controller/user.pm1
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/CatDap/Controller/admin.pm b/lib/CatDap/Controller/admin.pm
index 914b2d0..da609bb 100644
--- a/lib/CatDap/Controller/admin.pm
+++ b/lib/CatDap/Controller/admin.pm
@@ -143,7 +143,15 @@ sub account : Local {
my $mesg =
$c->model('user')
->search("(&(objectClass=inetOrgPerson)($attribute=$value))");
- my @entries = $mesg->entries;
+ my @orig_entries = $mesg->entries;
+ my @entries;
+ foreach my $entry (@orig_entries) {
+ my %new_entry;
+ foreach my $attr ($entry->attributes) {
+ $new_entry{$attr} = Encode::decode_utf8($entry->get_value($attr));
+ }
+ push @entries, \%new_entry;
+ }
push @errors, $mesg->error if $mesg->code;
$c->stash( entries => \@entries );
$c->stash( errors => \@errors );
@@ -295,6 +303,7 @@ sub account_modify : Local {
if grep /$attr/,
@{ ${ $c->config }{'Controller::User'}{'skip_attrs'} };
my @vals = $entry->get_value($attr);
+ foreach (@vals) { $_ = Encode::decode_utf8( $_ ); }
$attrdef = $schema->attribute($attr)
or die("getting schema failed: $!");
my %valhash = (
diff --git a/lib/CatDap/Controller/user.pm b/lib/CatDap/Controller/user.pm
index b3edb32..2d0ba04 100644
--- a/lib/CatDap/Controller/user.pm
+++ b/lib/CatDap/Controller/user.pm
@@ -202,6 +202,7 @@ sub index :Path :Args(0) {
next if ($attr eq "objectClass");
next if grep /$attr/,@{${$c->config}{'Controller::User'}{'skip_attrs'}};
my @vals = $entry->get_value($attr);
+ foreach (@vals) { $_ = Encode::decode_utf8( $_ ); }
$attrdef = $schema->attribute($attr) or die ("getting schema failed: $!");
my %valhash = (
name => $attr,