Ignore:
Timestamp:
09/12/08 11:39:24 (16 years ago)
Author:
niltonneto
Message:

Alterações feitas por João Alfredo.
Email: jakjr@…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoAdmin1_2/inc/class.user.inc.php

    r396 r414  
    269269                                } 
    270270 
    271                                 $this->db_functions->write_log("criado usuario $dn",'','','',''); 
     271                                $this->db_functions->write_log("created user",$dn); 
    272272                        } 
    273273 
     
    307307                        { 
    308308                                $return['status'] = false; 
    309                                 $return['msg'] = 'Você não tem direito de editar informações de usuários.'; 
     309                                $return['msg'] = lang('You do not have access to edit user informations') . '.'; 
    310310                                return $return; 
    311311                        } 
     
    331331                                                { 
    332332                                                        $dn = $newrdn . ',' . $newparent; 
    333                                                         $this->db_functions->write_log('alterado contexto do usuario' . $new_values['uid'] . ' de: ' . $old_values['context'] . ' para: ' . $new_values['context'],'',$dn,'',''); 
     333                                                        $this->db_functions->write_log('modified user context', $dn . ': ' . $old_values['uid'] . '->' . $new_values['context']); 
    334334                                                } 
    335335                                        } 
     
    342342                                        $ldap_mod_replace['givenname'] = $new_values['givenname']; 
    343343                                        $ldap_mod_replace['cn'] = $new_values['givenname'] . ' ' . $new_values['sn']; 
    344                                         $this->db_functions->write_log("alterado givenname do usuario $dn de ".$old_values['givenname']." para ".$new_values['givenname'],'','','',''); 
     344                                        $this->db_functions->write_log("modified first name", "$dn: " . $old_values['givenname'] . "->" . $new_values['givenname']); 
    345345                                } 
    346346                                if ($diff['sn']) 
     
    348348                                        $ldap_mod_replace['sn'] = $new_values['sn']; 
    349349                                        $ldap_mod_replace['cn'] = $new_values['givenname'] . ' ' . $new_values['sn']; 
    350                                         $this->db_functions->write_log("altera sn do usuario de ".$old_values['sn']." para ".$new_values['sn'],'','','',''); 
     350                                        $this->db_functions->write_log("modified last name", "$dn: " . $old_values['sn'] . "->" . $new_values['sn']); 
    351351                                } 
    352352                                if ($diff['mail']) 
     
    355355                                        $this->ldap_functions->replace_user2maillists($new_values['mail'], $old_values['mail']); 
    356356                                        $this->ldap_functions->replace_mail_from_institutional_account($new_values['mail'], $old_values['mail']); 
    357                                         $this->db_functions->write_log("alterado mail do usuario $dn de " . $old_values['mail'] . " para " . $new_values['mail'],'','','',''); 
    358                                 } 
    359                                 /* 
    360                                 if (($diff['mailalternateaddress']) && ($old_values['mailalternateaddress'] != '')) 
    361                                 { 
    362                                         $ldap_mod_replace['mailalternateaddress'] = $new_values['mailalternateaddress']; 
    363                                         $this->db_functions->write_log("alterado mailalternateaddress do usuario",'',$dn,'',''); 
    364                                 } 
    365                                 if (($diff['mailforwardingaddress']) && ($old_values['mailforwardingaddress'] != '')) 
    366                                 { 
    367                                         $ldap_mod_replace['mailforwardingaddress'] = $new_values['mailforwardingaddress']; 
    368                                         $this->db_functions->write_log("alterado mailforwardingaddress do usuario",'',$dn,'',''); 
    369                                 } 
    370                                 */ 
     357                                        $this->db_functions->write_log("modified user email", "$dn: " . $old_values['mail'] . "->" . $new_values['mail']); 
     358                                } 
    371359                                //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
    372360                                // Passwd Expired - Com atributo 
    373                                 if (($old_values['passwd_expired'] != '') && ($new_values['passwd_expired'] == '1')) 
     361                                if (($old_values['passwd_expired'] != 0) && ($new_values['passwd_expired'] == '1')) 
    374362                                { 
    375363                                        $ldap_mod_replace['phpgwlastpasswdchange'] = '0'; 
    376                                         $this->db_functions->write_log("Expirado senha do usuário $dn",'','','',''); 
     364                                        $this->db_functions->write_log("Expired user password","$dn"); 
    377365                                } 
    378366                        } 
     
    406394                                        } 
    407395                                         
    408                                         $this->db_functions->write_log("alterado password do usuario $dn",'','','',''); 
     396                                        $this->db_functions->write_log("modified user password",$dn); 
    409397                                } 
    410398                        } 
     
    416404                                { 
    417405                                        $ldap_mod_replace['telephonenumber'] = $new_values['telephonenumber']; 
    418                                         $this->db_functions->write_log("alterado telephonenumber do usuario $dn de ".$old_values['telephonenumber']." para ".$new_values['telephonenumber'],'','','',''); 
     406                                        $this->db_functions->write_log('modified user telephonenumber', $dn . ': ' . $old_values['telephonenumber'] . '->' . $new_values['telephonenumber']); 
    419407                                } 
    420408                        } 
     
    432420                                        { 
    433421                                                $ldap_atribute = str_replace("corporative_information_", "", $atribute); 
    434                                                 // REPLACE ATTRS OF CORPORATIVE 
     422                                                // REPLACE CORPORATIVE ATTRIBUTES 
    435423                                                if (($diff[$atribute]) && ($old_values[$atribute] != '')) 
    436424                                                { 
    437425                                                        $ldap_atribute = str_replace("corporative_information_", "", $atribute); 
    438                                                         $ldap_mod_replace[$ldap_atribute] = $new_values[$atribute]; 
    439                                                         $this->db_functions->write_log("alterado $ldap_atribute do usuario $dn de ".$old_values[$atribute]." para ".$new_values[$atribute],'','','',''); 
    440                                                 } 
    441                                                 //ADD ATTRS OF CORPORATIVE 
     426                                                        $ldap_mod_replace[$ldap_atribute] = utf8_encode($new_values[$atribute]); 
     427                                                        $this->db_functions->write_log('modified user attribute', $dn . ': ' . $ldap_atribute . ': ' . $old_values[$atribute] . '->' . $new_values[$atribute]); 
     428                                                } 
     429                                                //ADD CORPORATIVE ATTRIBUTES 
    442430                                                elseif (($old_values[$atribute] == '') && ($new_values[$atribute] != '')) 
    443431                                                { 
    444                                                         $ldap_add[$ldap_atribute] = $new_values[$atribute]; 
    445                                                         $this->db_functions->write_log("adicionado $ldap_atribute ao usuario $dn de ".$old_values[$atribute]." para ".$new_values[$atribute],'','','',''); 
    446                                                 } 
    447                                                 //REMOVE ATTRS OF CORPORATIVE 
     432                                                        $ldap_add[$ldap_atribute] = utf8_encode($new_values[$atribute]); 
     433                                                        $this->db_functions->write_log('added user attribute', $dn . ': ' . $ldap_atribute . ': ' . $old_values[$atribute] . '->' . $new_values[$atribute]); 
     434                                                } 
     435                                                //REMOVE CORPORATIVE ATTRIBUTES 
    448436                                                elseif (($old_values[$atribute] != '') && ($new_values[$atribute] == '')) 
    449437                                                { 
    450438                                                        $ldap_remove[$ldap_atribute] = array(); 
    451                                                         $this->db_functions->write_log("removido $ldap_atribute do usuario $dn de ".$old_values[$atribute]." para ".$new_values[$atribute],'','','','');         
     439                                                        $this->db_functions->write_log('removed user attribute', $dn . ': ' . $ldap_atribute . ': ' . $old_values[$atribute] . '->' . $new_values[$atribute]);   
    452440                                                } 
    453441                                        } 
     
    463451                                { 
    464452                                        $ldap_mod_replace['gidnumber'] = $new_values['gidnumber']; 
    465                                         $this->db_functions->write_log("alterado gidnumber do usuario $dn. De:".$old_values['gidnumber']." Para:".$new_values['gidnumber'],'','','',''); 
     453                                        $this->db_functions->write_log('modified user primary group', $dn . ': ' . $old_values['gidnumber'] . '->' . $new_values['gidnumber']); 
    466454                                } 
    467455                                 
     
    471459                                        { 
    472460                                                $ldap_mod_replace['sambaPrimaryGroupSID']       = $this->current_config['expressoAdmin_sambaSID'] . '-' . ((2 * $new_values['gidnumber'])+1001); 
    473                                                 $this->db_functions->write_log("alterado sambaPrimaryGroupSID do usuario $dn.",'','','',''); 
     461                                                $this->db_functions->write_log('modified user sambaPrimaryGroupSID', $dn); 
    474462                                        } 
    475463                                         
     
    477465                                        { 
    478466                                                $ldap_mod_replace['sambaacctflags'] = $new_values['sambaacctflags']; 
    479                                                 $this->db_functions->write_log("alterado sambaacctflags do usuario $dn",'','','',''); 
     467                                                $this->db_functions->write_log("modified user sambaacctflags",$dn); 
    480468                                        } 
    481469                                        if ($diff['sambalogonscript']) 
    482470                                        { 
    483471                                                $ldap_mod_replace['sambalogonscript'] = $new_values['sambalogonscript']; 
    484                                                 $this->db_functions->write_log("alterado sambalogonscript do usuario $dn",'','','',''); 
     472                                                $this->db_functions->write_log("modified user sambalogonscript",$dn); 
    485473                                        } 
    486474                                        if ($diff['sambahomedirectory']) 
    487475                                        { 
    488476                                                $ldap_mod_replace['homedirectory'] = $new_values['sambahomedirectory']; 
    489                                                 $this->db_functions->write_log("alterado homedirectory do usuario $dn",'','','',''); 
     477                                                $this->db_functions->write_log("modified user homedirectory",$dn); 
    490478                                        } 
    491479                                        if ($diff['sambadomain']) 
     
    493481                                                $ldap_mod_replace['sambaSID']                           = $diff['sambadomain'] . '-' . ((2 * $old_values['uidnumber'])+1000); 
    494482                                                $ldap_mod_replace['sambaPrimaryGroupSID']       = $diff['sambadomain'] . '-' . ((2 * $old_values['gidnumber'])+1001); 
    495                                                 $this->db_functions->write_log("alterado dominio samba do usuario $dn para " . $params['sambadomain'],'','','',''); 
     483                                                $this->db_functions->write_log('modified user samba domain', $dn . ': ' . $old_values['sambadomain'] . '->' . $new_values['sambadomain']); 
    496484                                        } 
    497485                                } 
     
    509497                                { 
    510498                                        $this->ldap_functions->ldap_remove_photo($dn); 
    511                                         $this->db_functions->write_log("removido jpegphoto do usuario $dn",'','','',''); 
     499                                        $this->db_functions->write_log("removed user photo",$dn); 
    512500                                } 
    513501                                elseif ($_FILES['photo']['name'] != '') 
     
    517505                                        { 
    518506                                                $return['status'] = false; 
    519                                                 $return['msg'] .= 'Foto do usuário não foi salva, pois excede o tamanho máximo de 10 kb.'; 
     507                                                $return['msg'] .= lang('User photo could not be save because is bigger the 10 kb') . '.'; 
    520508                                        } 
    521509                                        else 
     
    524512                                                { 
    525513                                                        $photo_exist = true; 
    526                                                         $this->db_functions->write_log("substituido jpegphoto do usuario $dn",'','','',''); 
     514                                                        $this->db_functions->write_log("mofified user photo",$dn); 
    527515                                                } 
    528516                                                else 
    529517                                                { 
    530518                                                        $photo_exist = false; 
    531                                                         $this->db_functions->write_log("adicionado jpegphoto ao usuario $dn",'','','',''); 
     519                                                        $this->db_functions->write_log("added user photo",$dn); 
    532520                                                }                                
    533521                                                $this->ldap_functions->ldap_save_photo($dn, $_FILES['photo']['tmp_name'], $new_values['photo_exist'], $photo_exist); 
     
    544532                                { 
    545533                                        $ldap_add['telephonenumber'] = $new_values['telephonenumber']; 
    546                                         $this->db_functions->write_log("adicionado telephonenumber ao usuario $dn",'','','',''); 
     534                                        $this->db_functions->write_log("added user phone",$dn); 
    547535                                } 
    548536                                if (($old_values['telephonenumber'] != '') && ($new_values['telephonenumber'] == '')) 
    549537                                { 
    550538                                        $ldap_remove['telephonenumber'] = array(); 
    551                                         $this->db_functions->write_log("removido telephonenumber do usuario $dn",'','','',''); 
     539                                        $this->db_functions->write_log("removed user phone",$dn); 
    552540                                } 
    553541                                //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
     
    556544                                { 
    557545                                        $ldap_add['phpgwlastpasswdchange'] = '0'; 
    558                                         $this->db_functions->write_log("Expirado senha do usuário $dn",'','','',''); 
     546                                        $this->db_functions->write_log("expired user password",$dn); 
    559547                                } 
    560548                                if (($old_values['passwd_expired'] == '0') && ($new_values['passwd_expired'] == '')) 
    561549                                { 
    562550                                        $ldap_remove['phpgwlastpasswdchange'] = array(); 
    563                                         $this->db_functions->write_log("Removido expiração da senha do usuário $dn",'','','',''); 
     551                                        $this->db_functions->write_log("removed expiry from user password",$dn); 
    564552                                } 
    565553                                //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
     
    568556                                { 
    569557                                        $this->db_functions->add_pref_changepassword($new_values['uidnumber']); 
    570                                         $this->db_functions->write_log("adicionado changepassword ao usuario $dn",'','','',''); 
     558                                        $this->db_functions->write_log("turn on changepassword",$dn); 
    571559                                } 
    572560                                if (($old_values['changepassword'] != '') && ($new_values['changepassword'] == '')) 
    573561                                { 
    574562                                        $this->db_functions->remove_pref_changepassword($new_values['uidnumber']); 
    575                                         $this->db_functions->write_log("removido changepassword do usuario $dn",'','','',''); 
     563                                        $this->db_functions->write_log("turn of changepassword",$dn); 
    576564                                } 
    577565                                //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
     
    580568                                { 
    581569                                        $ldap_add['phpgwaccountstatus'] = 'A'; 
    582                                         $this->db_functions->write_log("ativado conta do usuario $dn",'','','',''); 
     570                                        $this->db_functions->write_log("turn on user account",$dn); 
    583571                                } 
    584572                                if (($old_values['phpgwaccountstatus'] != '') && ($new_values['phpgwaccountstatus'] == '')) 
    585573                                { 
    586574                                        $ldap_remove['phpgwaccountstatus'] = array(); 
    587                                         $this->db_functions->write_log("desativado conta do usuario $dn",'','','',''); 
     575                                        $this->db_functions->write_log("turn off user account",$dn); 
    588576                                } 
    589577                                //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
     
    592580                                { 
    593581                                        $ldap_add['phpgwaccountvisible'] = '-1'; 
    594                                         $this->db_functions->write_log("adicionado phpgwaccountvisible ao usuario $dn",'','','',''); 
     582                                        $this->db_functions->write_log("turn on phpgwaccountvisible",$dn); 
    595583                                } 
    596584                                if (($old_values['phpgwaccountvisible'] != '') && ($new_values['phpgwaccountvisible'] == '')) 
    597585                                { 
    598586                                        $ldap_remove['phpgwaccountvisible'] = array(); 
    599                                         $this->db_functions->write_log("removido phpgwaccountvisible ao usuario $dn",'','','',''); 
     587                                        $this->db_functions->write_log("turn off phpgwaccountvisible",$dn); 
    600588                                } 
    601589                                //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
     
    604592                                { 
    605593                                        $ldap_add['accountstatus'] = 'active'; 
    606                                         $this->db_functions->write_log("ativado conta de email do usuario $dn",'','','',''); 
     594                                        $this->db_functions->write_log("turn on user account email",$dn); 
    607595                                } 
    608596                                if (($old_values['accountstatus'] != '') && ($new_values['accountstatus'] == '')) 
    609597                                { 
    610598                                        $ldap_remove['accountstatus'] = array(); 
    611                                         $this->db_functions->write_log("desativado conta de email do usuario $dn",'','','',''); 
    612                                 } 
    613                                 /* 
    614                                 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
    615                                 // MAILALTERNATEADDRESS 
    616                                 if (($old_values['mailalternateaddress'] == '') && ($new_values['mailalternateaddress'] != '')) 
    617                                 { 
    618                                         $ldap_add['mailalternateaddress'] = $new_values['mailalternateaddress']; 
    619                                         $this->db_functions->write_log("adicionado mailalternateaddress ao usuario",'',$dn,'',''); 
    620                                 } 
    621                                 if (($old_values['mailalternateaddress'] != '') && ($new_values['mailalternateaddress'] == '')) 
    622                                 { 
    623                                         $ldap_remove['mailalternateaddress'] = array(); 
    624                                         $this->db_functions->write_log("removido mailalternateaddress ao usuario",'',$dn,'',''); 
    625                                 } 
    626                                 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
    627                                 // MAILFORWARDINGADDRESS 
    628                                 if (($old_values['mailforwardingaddress'] == '') && ($new_values['mailforwardingaddress'] != '')) 
    629                                 { 
    630                                         $ldap_add['mailforwardingaddress'] = $new_values['mailforwardingaddress']; 
    631                                         $this->db_functions->write_log("adicionado mailforwardingaddress ao usuario",'',$dn,'',''); 
    632                                 } 
    633                                 if (($old_values['mailforwardingaddress'] != '') && ($new_values['mailforwardingaddress'] == '')) 
    634                                 { 
    635                                         $ldap_remove['mailforwardingaddress'] = array(); 
    636                                         $this->db_functions->write_log("removido mailforwardingaddress ao usuario",'',$dn,'',''); 
    637                                 } 
    638                                 */ 
    639                                  
     599                                        $this->db_functions->write_log("turn off user account email",$dn); 
     600                                } 
    640601                                //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
    641602                                // MAILALTERNATEADDRESS 
     
    651612                                        { 
    652613                                                $ldap_add['mailalternateaddress'][] = $mailalternateaddress; 
    653                                                 $this->db_functions->write_log("adicionado mailalternateaddress $mailalternateaddress ao usuario $dn",'',$dn,'',''); 
     614                                                $this->db_functions->write_log("added mailalternateaddress","$dn: $mailalternateaddress"); 
    654615                                        } 
    655616                                } 
     
    661622                                                { 
    662623                                                        $ldap_remove['mailalternateaddress'][] = $mailalternateaddress; 
    663                                                         $this->db_functions->write_log("removido mailalternateaddress $mailalternateaddress do usuario $dn",'',$dn,'',''); 
     624                                                        $this->db_functions->write_log("removed mailalternateaddress","$dn: $mailalternateaddress"); 
    664625                                                } 
    665626                                        } 
     
    679640                                        { 
    680641                                                $ldap_add['mailforwardingaddress'][] = $mailforwardingaddress; 
    681                                                 $this->db_functions->write_log("adicionado mailforwardingaddress $mailforwardingaddress ao usuario $dn",'',$dn,'',''); 
     642                                                $this->db_functions->write_log("added mailforwardingaddress","$dn: $mailforwardingaddress"); 
    682643                                        } 
    683644                                } 
     
    689650                                                { 
    690651                                                        $ldap_remove['mailforwardingaddress'][] = $mailforwardingaddress; 
    691                                                         $this->db_functions->write_log("removido mailforwardingaddress $mailforwardingaddress do usuario $dn",'',$dn,'',''); 
     652                                                        $this->db_functions->write_log("removed mailforwardingaddress","$dn: $mailforwardingaddress"); 
    692653                                                } 
    693654                                        } 
     
    699660                                { 
    700661                                        $ldap_add['deliverymode'] = 'forwardOnly'; 
    701                                         $this->db_functions->write_log("adicionado forwardOnly ao usuario $dn",'','','',''); 
     662                                        $this->db_functions->write_log("added forwardOnly", $dn); 
    702663                                } 
    703664                                if (($old_values['deliverymode'] != '') && ($new_values['deliverymode'] == '')) 
    704665                                { 
    705666                                        $ldap_remove['deliverymode'] = array(); 
    706                                         $this->db_functions->write_log("removido forwardOnly ao usuario $dn",'','','',''); 
     667                                        $this->db_functions->write_log("removed forwardOnly", $dn); 
    707668                                } 
    708669                        } 
     
    716677                                { 
    717678                                        $this->imap_functions->change_user_quota($new_values['uid'], $new_values['mailquota']); 
    718                                         $this->db_functions->write_log("alterado cota do usuario $dn",'','','',''); 
     679                                        $this->db_functions->write_log("modified user email quota", $dn); 
    719680                                } 
    720681                        } 
     
    739700                                        $ldap_remove['sambaPwdLastSet']                 = array(); 
    740701                                        $ldap_remove['sambaPwdMustChange']              = array(); 
    741                                         $this->db_functions->write_log("removido atributos samba do usuario $dn.",'','','',''); 
     702                                        $this->db_functions->write_log("removed user samba attributes", $dn); 
    742703                                } 
    743704                                ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
     
    745706                                if (($this->current_config['expressoAdmin_samba_support'] == 'true') && (!$new_values['userSamba']) && ($new_values['use_attrs_samba'] == 'on')) 
    746707                                { 
    747                                         //Verifica se o binario para criar as senhas do samba exite. 
    748708                                        if (!is_file('/home/expressolivre/mkntpwd')) 
    749709                                        { 
    750710                                                $return['status'] = false; 
    751                                                 $return['msg'] .= "O arquivo binário /home/expressolivre/mkntpwd não exite.\\nEle é necessário para a criação das senhas usadas pelo SAMBA.\\nInforme o administrador ExpressoLivre sobre isto.\\n"; 
     711                                                $return['msg'] .= lang("The file /home/expressolivre/mkntpwd does not exist") . ".\n"; 
     712                                                $return['msg'] .= lang("It is necessery to create samba passwords") . ".\n"; 
     713                                                $return['msg'] .= lang("Inform your system administrator about this") . ".\n"; 
    752714                                        } 
    753715                                        else 
     
    766728                                                $ldap_add['sambaPwdLastSet']            = strtotime("now"); 
    767729                                                $ldap_add['sambaPwdMustChange'] = '2147483647'; 
    768                                                 $this->db_functions->write_log("adicionado atributos samba ao usuario $dn.",'','','',''); 
     730                                                $this->db_functions->write_log("added user samba attribute", $dn); 
    769731                                        } 
    770732                                } 
     
    795757                                                $this->db_functions->add_user2group($gidnumber, $new_values['uidnumber']); 
    796758                                                $this->ldap_functions->add_user2group($gidnumber, $user_uid); 
    797                                                 $this->db_functions->write_log("adicionado usuario $dn ao grupo $gidnumber.",'','','',''); 
     759                                                $this->db_functions->write_log("inserted user to group", "$dn: $gidnumber"); 
    798760                                        } 
    799761                                } 
     
    809771                                                                $this->db_functions->remove_user2group($gidnumber, $new_values['uidnumber']); 
    810772                                                                $this->ldap_functions->remove_user2group($gidnumber, $user_uid); 
    811                                                                 $this->db_functions->write_log("removido usuario $dn do grupo $gidnumber.",'','','',''); 
     773                                                                $this->db_functions->write_log("removed user from group", "$dn: $gidnumber"); 
    812774                                                        } 
    813775                                                } 
    814776                                        } 
    815777                                } 
    816                                 /* GIDNUMBER agora é um atributo samba e pode ser alterado por gerentes com este perfil 
    817                                 /* 
    818                                 if ($diff['gidnumber']) 
    819                                 { 
    820                                         $ldap_mod_replace['gidnumber'] = $new_values['gidnumber']; 
    821                                         if (($this->current_config['expressoAdmin_samba_support'] == 'true') && ($new_values['userSamba']) && ($new_values['use_attrs_samba'] == 'on')) 
    822                                         { 
    823                                                 $ldap_mod_replace['sambaPrimaryGroupSID']       = $this->current_config['expressoAdmin_sambaSID'] . '-' . ((2 * $new_values['gidnumber'])+1001); 
    824                                         } 
    825                                         $this->db_functions->write_log("alterado gidnumber do usuario.",'',$dn,'',''); 
    826                                 } 
    827                                 */ 
    828778                        } 
    829779                        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
     
    843793                        if (count($ldap_add)) 
    844794                        { 
    845                                 echo 'ldap-add<br>'; 
    846                                 print_r($ldap_add); 
    847795                                $result = $this->ldap_functions->add_user_attributes($dn, $ldap_add); 
    848796                                if (!$result['status']) 
     
    857805                        if (count($ldap_remove)) 
    858806                        { 
    859                                 echo 'ldap-remove<br>'; 
    860                                 print_r($ldap_remove); 
    861807                                $result = $this->ldap_functions->remove_user_attributes($dn, $ldap_remove); 
    862808                                if (!$result['status']) 
     
    886832                                        { 
    887833                                                $this->ldap_functions->add_user2maillist($uid, $new_values['mail']); 
    888                                                 $this->db_functions->write_log("adicionado usuario $dn a maillist $uid.",'','','',''); 
    889                                         } 
    890                                 } 
    891                                 /* 
    892                                 echo '<pre>'; 
    893                                 print_r($old_values['maillists']); 
    894                                 print_r($new_values['maillists']); 
    895                                 */ 
    896                                  
     834                                                $this->db_functions->write_log("inserted user to maillist","$dn: $uid"); 
     835                                        } 
     836                                } 
     837 
    897838                                if (count($remove_maillists)>0) 
    898839                                { 
     
    900841                                        { 
    901842                                                $this->ldap_functions->remove_user2maillist($uid, $new_values['mail']); 
    902                                                 $this->db_functions->write_log("removido usuario $dn da maillist $uid.",'','','',''); 
     843                                                $this->db_functions->write_log("removed user from maillist","$dn: $uid"); 
    903844                                        } 
    904845                                } 
     
    930871 
    931872                                        foreach ($add_apps as $app => $index) 
    932                                                 $this->db_functions->write_log("Adicionado aplicativo $app ao usuário $dn",'',$dn,'',''); 
     873                                                $this->db_functions->write_log("added application to user","$dn: $app"); 
    933874                                } 
    934875                                if (count($remove_apps)>0) 
     
    945886                                         
    946887                                        foreach ($remove_apps2 as $app => $access) 
    947                                                 $this->db_functions->write_log("Removido aplicativo $app do usuário $dn",'',$dn,'',''); 
     888                                                $this->db_functions->write_log("removed application to user","$dn: $app"); 
    948889                                } 
    949890                                ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
     
    976917                        { 
    977918                                $return['status'] = false; 
    978                                 $return['msg'] = 'Senha default já cadastrada!'; 
    979                         } 
    980                          
    981                         $this->db_functions->write_log("Setado senha default para $uid",'','','',''); 
     919                                $return['msg'] = lang('default password already registered') . '!'; 
     920                        } 
     921                         
     922                        $this->db_functions->write_log("inserted default password",$uid); 
    982923                         
    983924                        return $return; 
     
    997938                        { 
    998939                                $return['status'] = false; 
    999                                 $return['msg'] = 'Senha default NÃO cadastrada!'; 
    1000                         } 
    1001                          
    1002                         $this->db_functions->write_log("Retornado senha default de $uid",'','','',''); 
     940                                $return['msg'] = lang('default password not registered') . '!'; 
     941                        } 
     942                         
     943                        $this->db_functions->write_log("returned user password",$uid); 
    1003944                         
    1004945                        return $return; 
     
    1039980                                                $return['msg'] .= $result_ldap['msg']; 
    1040981                                        } 
    1041                                         $this->db_functions->write_log('deletado usuario ' . $user_info['uid'],'','','',''); 
     982                                        $this->db_functions->write_log('deleted user', $user_info['uid']); 
    1042983                                } 
    1043984                        } 
     
    1055996                        { 
    1056997                                $return['status'] = false; 
    1057                                 $return['msg'] .= 'Você não tem acesso para deletar este usuário.'; 
     998                                $return['msg'] .= lang('You do not have access to delete user') . '.'; 
    1058999                                return $return; 
    10591000                        } 
    10601001 
    1061                         // Check if the new_uid alrteady is in use.                      
     1002                        // Check if the new_uid is in use.                       
    10621003                        if ( ! $this->ldap_functions->check_rename_new_uid($params['new_uid']) ) 
    10631004                        { 
    10641005                                $return['status'] = false; 
    1065                                 $return['msg'] = 'Novo login já está em uso.'; 
     1006                                $return['msg'] = lang('New login already in use') . '.'; 
    10661007                                return $return; 
    10671008                        } 
     
    10951036                { 
    10961037                                        $return['status'] = false; 
    1097                                         $return['msg'] = "A renomeação de usuários só permitida com o cyrus versão 2.2 ou superior,"; 
    1098                                         $return['msg'] .= "\ne com a opção 'allowusermoves: yes' configurado no imapd.conf."; 
     1038                                        $return['msg'] = "The rename user is only permitted with cyrus 2.2 or higher,"; 
     1039                                        $return['msg'] .= "\nand with the option 'allowusermoves: yes' set in imapd.conf."; 
     1040 
     1041 
    10991042                                        return $return; 
    11001043                        } 
     
    11051048                                { 
    11061049                                        $return['status'] = false; 
    1107                                         $return['msg'] = "Erro ao renomear usuário no LDAP. Processo abortado."; 
     1050                                        $return['msg'] = lang("Error rename user in LDAP") . '.'; 
    11081051                                        return $return; 
    11091052                                } 
     
    11171060                                         
    11181061                                        $return['status'] = false; 
    1119                                         $return['msg'] = "Erro ao renomear usuário no Cyrus. Processo abortado."; 
     1062                                        $return['msg'] = lang("Erro rename user in Cyrus") . '.'; 
    11201063                                        return $return; 
    11211064                                } 
     
    11541097                                        else  
    11551098                                        { 
     1099                                                $return['msg'] .= $result['msg'] . lang("Error renome sieve script") . '.'; 
     1100                                        } 
     1101                                        $sieve->sieve_logout(); 
     1102                                } 
     1103                                else 
     1104                                { 
    11561105                                                $return['status'] = false; 
    1157                                                 $return['msg'] .= $result['msg'] . "Erro ao renomear script sieve, falha no envio do novo script." . 
    1158                                                                                                                         "\nCaixa postal e login alterados."; 
    1159                                         } 
    1160                                         $sieve->sieve_logout(); 
    1161                                 } 
    1162                                 else 
    1163                                 { 
    1164                                                 $return['status'] = false; 
    1165                                                 $return['msg'] .= $result['msg'] . "Erro ao renomear script sieve, falha no Login." . 
    1166                                                                                                                         "\nCaixa postal e login alterados."; 
     1106                                                $return['msg'] .= $result['msg'] . lang("Error renome sieve script") . '.'; 
    11671107                                } 
    11681108 
     
    11701110                                $this->ldap_functions->set_user_password($new_uid, $user_password); 
    11711111                 
    1172                                 $this->db_functions->write_log("renomeado login do usuario $uid para $new_uid.",'','','',''); 
     1112                                $this->db_functions->write_log("renamed user", "$uid -> $new_uid"); 
    11731113 
    11741114                                $return['exec_return'] = ""; 
Note: See TracChangeset for help on using the changeset viewer.