Changeset 464
- Timestamp:
- 10/03/09 03:25:03 (15 years ago)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrForms.pm
r448 r464 32 32 postalCode => [ 'Code postal' ], 33 33 postOfficeBox => [ 'BP' ], 34 department => [ 'Département' ],34 department => [ 'Département', 'select-N:group' ], 35 35 streetAddress => [ 'Rue', 'textarea' ], 36 36 title => [ 'Fonction' ], -
LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm
r441 r464 78 78 directReports => 'directReports', 79 79 managedObjects => 'managedObjects', 80 department => 'department',81 80 otheraddress => 'otheraddress', 82 81 mainaddress => 'mainaddress', … … 137 136 } 138 137 return \@res; 139 } elsif ($field eq 'department') {140 my $sth = $self->db->prepare_cached(141 q{142 select name from "group" join143 group_attributes on "group".ikey = group_attributes.okey144 where okey in (select okey from group_attributes_users where value = ?)145 and attr = ? and value = ?146 }147 );148 $sth->execute($self->id, 'sutype', 'dpmt');149 my @res;150 while (my $res = $sth->fetchrow_hashref) {151 push(@res, $res->{name});152 }153 return join(',', @res);154 138 } elsif ($field eq 'managedObjects') { 155 139 my $sth = $self->db->prepare_cached(
Note: See TracChangeset
for help on using the changeset viewer.