/[soft]/identity/CatDap/trunk/lib/CatDap/Controller/admin.pm
ViewVC logotype

Diff of /identity/CatDap/trunk/lib/CatDap/Controller/admin.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 558 by misc, Thu Dec 16 00:34:25 2010 UTC revision 559 by buchan, Tue Feb 15 23:01:21 2011 UTC
# Line 143  sub account : Local { Line 143  sub account : Local {
143      my $mesg =      my $mesg =
144        $c->model('user')        $c->model('user')
145        ->search("(&(objectClass=inetOrgPerson)($attribute=$value))");        ->search("(&(objectClass=inetOrgPerson)($attribute=$value))");
146      my @entries = $mesg->entries;      my @orig_entries = $mesg->entries;
147        my @entries;
148        foreach my $entry (@orig_entries) {
149            my %new_entry;
150            foreach my $attr ($entry->attributes) {
151                $new_entry{$attr} = Encode::decode_utf8($entry->get_value($attr));
152            }
153            push @entries, \%new_entry;
154        }
155      push @errors, $mesg->error if $mesg->code;      push @errors, $mesg->error if $mesg->code;
156      $c->stash( entries => \@entries );      $c->stash( entries => \@entries );
157      $c->stash( errors  => \@errors );      $c->stash( errors  => \@errors );
# Line 295  sub account_modify : Local { Line 303  sub account_modify : Local {
303            if grep /$attr/,            if grep /$attr/,
304              @{ ${ $c->config }{'Controller::User'}{'skip_attrs'} };              @{ ${ $c->config }{'Controller::User'}{'skip_attrs'} };
305          my @vals = $entry->get_value($attr);          my @vals = $entry->get_value($attr);
306            foreach (@vals) { $_ = Encode::decode_utf8( $_ ); }
307          $attrdef = $schema->attribute($attr)          $attrdef = $schema->attribute($attr)
308            or die("getting schema failed: $!");            or die("getting schema failed: $!");
309          my %valhash = (          my %valhash = (

Legend:
Removed from v.558  
changed lines
  Added in v.559

  ViewVC Help
Powered by ViewVC 1.1.30