Changeset 182 for LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm
- Timestamp:
- 05/25/09 02:29:48 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm
r175 r182 46 46 sub _delayed_fields { 47 47 my ($self)= @_; 48 return qw(memberOf manager );48 return qw(memberOf manager directReports); 49 49 } 50 50 … … 62 62 accountExpires => 'accountExpires', 63 63 shadowExpire => 'shadowExpire', 64 directReports => 'directReports', 64 65 ) : ()), 65 66 } … … 87 88 ); 88 89 $sth->execute($self->id, 'memberUID'); 90 my @res; 91 while (my $res = $sth->fetchrow_hashref) { 92 push(@res, $res->{id}); 93 } 94 return \@res; 95 } elsif ($field eq 'directReports') { 96 my $sth = $self->db->prepare_cached( 97 q{ 98 select id from user_attributes join user_attributes_list 99 on user_attributes_list.ikey = user_attributes.attr 100 where value = ? and canonical = ? 101 } 102 ); 103 $sth->execute($self->id, 'manager'); 89 104 my @res; 90 105 while (my $res = $sth->fetchrow_hashref) {
Note: See TracChangeset
for help on using the changeset viewer.