- Timestamp:
- 01/11/16 16:08:29 (9 years ago)
- Location:
- trunk/LATMOS-Accounts
- Files:
-
- 2 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 -
trunk/LATMOS-Accounts/man/man8/latmos-accounts-base-sql.pod
r1590 r1628 9 9 The C<libpq> connection parameters, eg a semin colon separated paramaters 10 10 containing the server, the database name, user and password, etc... 11 12 =head2 remove_old_dpmt 13 14 By default when the department is changed on a user account it remains in the 15 department group as a secondary department. 16 17 Setting C<remove_old_dpmt> to true in the config will force user removal from 18 the group when department is changed. 19 The user can still be added back later. 11 20 12 21 =head1 FEATURES
Note: See TracChangeset
for help on using the changeset viewer.