Changeset 2074
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Ajax.pm
r1329 r2074 128 128 $c->stash->{random_password} = 129 129 LATMOS::Accounts::Utils::genpassword( 130 %{ $c->req->params() } 130 %{ $c->req->params() }, 131 checkpassword => sub { 132 $self->model('Accounts')->base->check_password(@_) 133 }, 131 134 ); 132 135 } -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm
r2070 r2074 1581 1581 my $cval = $currentemployment->get_attributes($attr) || ''; 1582 1582 1583 for ($attr) { 1584 if ($attr eq 'managerContact') { 1585 if (!$cval) { 1586 my $dpmt = $currentemployment->get_attributes('department') or last; 1587 my $odmpt = $currentemployment->base->get_object('group', $dpmt) or last; 1588 $cval = $odmpt->get_attributes('managedBy'); 1589 } 1583 if ($attr eq 'managerContact') { 1584 if (!$cval) { 1585 my $dpmt = $currentemployment->get_attributes('department') or last; 1586 my $odmpt = $currentemployment->base->get_object('group', $dpmt) or last; 1587 $cval = $odmpt->get_attributes('managedBy'); 1590 1588 } 1591 1589 } … … 1625 1623 ); 1626 1624 1627 my @attributesToReset = _reported_atributes; 1628 if (!$self->_get_attributes('_startEmployment')) { 1629 push(@attributesToReset, qw(department)); 1630 } 1625 my @attributesToReset = (_reported_atributes, qw(department)); 1631 1626 1632 1627 foreach my $attr (@attributesToReset) { 1633 1628 my $default = $self->base->config("unemployment.$attr") || ''; 1634 1629 my $old = $self->_get_attributes($attr) || ''; 1630 warn "$attr $old $default"; 1635 1631 if ($old ne $default) { 1636 1632 $changes{$attr} = $default || undef; … … 1643 1639 $changes{'manager'} = $onext->_get_attributes('managerContact'); 1644 1640 } 1645 1646 1641 } 1647 1642
Note: See TracChangeset
for help on using the changeset viewer.