Changeset 1628 for trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases
- Timestamp:
- 01/11/16 16:08:29 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm
r1625 r1628 1311 1311 } 1312 1312 1313 sub set_fields { 1314 my ($self, %data) = @_; 1315 1316 my $old; 1317 if (exists($data{department})) { 1318 $old = $self->_get_attributes('department'); 1319 } 1320 if (($data{department} || '') eq ($old || '')) { 1321 # We do not remove the group, there is no change 1322 $old = undef; 1323 } 1324 1325 my $res = $self->SUPER::set_fields(%data) or return; 1326 1327 if ($self->base->config('remove_old_dpmt') && $old) { 1328 $self->base->log(LA_DEBUG, 1329 "Removing %s from group %s (department change to %s)", 1330 $self->id, 1331 $old, 1332 $data{department} || ''); 1333 $self->_delAttributeValue('memberOf', $old) or return; 1334 $res++; 1335 } 1336 1337 $res 1338 } 1339 1313 1340 =head2 listEmployment 1314 1341
Note: See TracChangeset
for help on using the changeset viewer.