Changeset 831 for LATMOS-Accounts


Ignore:
Timestamp:
03/19/10 01:23:11 (14 years ago)
Author:
vivat
Message:

Prise en charge des heberges sauf Novimet dans l'annuaire

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/bin/la-web-directory

    r829 r831  
    7979        } 
    8080    } 
     81 
     82# On ne prend que le personnel LATMOS et les heberges, sauf Novimet 
     83 
     84    my $company = $ouser->get_attributes('company'); 
     85    my $contrat = $ouser->get_attributes('contratType'); 
     86    if ($company){ 
     87            if (($company ne "LATMOS")&&($contrat ne "heberges")) { 
     88                next; 
     89        } 
     90            if ($company eq "Novimet") { 
     91                next; 
     92        } 
     93    } else { 
     94            if ((!$contrat)||($contrat ne "heberges")) { 
     95                next; 
     96        } 
     97    } 
     98 
    8199    my @oaddress; 
    82100 
     
    90108        @oaddress = ($ouser); 
    91109    } 
     110 
     111# Si c'est un heberge, on place departement a "EXT" 
     112 
     113    my $department; 
     114 
     115    if ($contrat eq "heberges") { 
     116            $department = "EXT"; 
     117    } else { 
     118            $department = $ouser->get_attributes('department'); 
     119    } 
    92120             
    93         my $line = join(';', map { $_ || '' } ( 
     121    my $line = join(';', map { $_ || '' } ( 
    94122            $ouser->get_attributes('sn'), 
    95123            $ouser->get_attributes('givenName'), 
    96             $ouser->get_attributes('department'), 
     124            $department, 
    97125            ($oaddress[0] ? join(' ', map { $_ || '' } 
    98126                    $oaddress[0]->get_attributes('l'), grep { $_ } 
Note: See TracChangeset for help on using the changeset viewer.