diff options
Diffstat (limited to 'lib/CatDap/Controller/admin.pm')
-rw-r--r-- | lib/CatDap/Controller/admin.pm | 11 |
1 files changed, 10 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 = ( |