Ignore:
Timestamp:
Nov 10, 2007, 8:31:58 PM (16 years ago)
Author:
sebas
Message:

Gracias sabino para esos cambios.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/alternc/patches/m_mail_egw.php

    r35 r39  
    55
    66
    7         function __construct () {
    8                 global $mail;
    9                 $mail = $this;
    10         }
     7//      function __construct () {
     8//              global $mail;
     9//              $mail = $this;
     10//      }
    1111//      function _createpop($mail,$dom,$pass) {
    1212//              global $err,$cuid,$db;
     
    4343       
    4444                if ($this->_add_egw_account($mail,$dom,$pass) )
    45                         if (parent::__createpop($mail,$dom,$pass))
    46                         return true;
     45                        if (parent::_createpop($mail,$dom,$pass))
     46                                return true;
    4747                        else
    4848                                return false;
     
    5555
    5656                $res = true;
    57                 if (substr($dom,-10) == "cta.org.ar") {
     57                $domain = explode('.',$dom);
     58                $size = count($domain);
     59                if (  $size >= 3 &&
     60                        $domain[$size-3] == "cta" &&
     61                        $domain[$size-2] == "org" &&
     62                        $domain[$size-1] == "ar" ) {
    5863
    5964                        $admincli= "/var/alternc/html/i/intranet/intranet.redcta.org.ar/wwws/stable/admin/admin-cli.php";
     
    6974                        $canchangepw= "yes";
    7075                        $anonuser= "no";
    71                         $primarygroup = substr($dom,-10);
    72                         $secondarygroup = substr($dom,0,-11);
    73 
     76                        $primarygroup = $domain[$size-3];
     77                        $secundarygroup = join(',', array_slice($domain,0,-3));
    7478                        $lastname = "-";
    7579                        $firstname = $mail;
Note: See TracChangeset for help on using the changeset viewer.