Ejemplo n.º 1
0
 public function borrarEntrada()
 {
     //Verificar que el grupo asociado también sea borrado
     if ($this->cfgDominio['mover_en_ou']) {
         $grupo = new \LdapPM\Modelos\modeloSambaGroupMapping($this->destino, $this->usuario, $this->password);
         $grupo->setCn($this->entrada['ou']);
         if (!$grupo->verificaExistencia()) {
             return $this->borrarObjetoLdap();
         } else {
             $this->configurarErrorLdap('Actualizacion', 'Aún existe un grupo asociado a esta OU');
             return false;
         }
     } else {
         return $this->borrarObjetoLdap();
     }
 }
Ejemplo n.º 2
0
 public function crearEntrada()
 {
     // TODO: Ya es posible crear un uidNumber único, por tanto, un sambaSID también, si bien eso no se considera en este objeto en particular
     $uidNumber = $this->primerIdDisponible('uidNumber');
     $this->entrada['uidNumber'] = $uidNumber;
     if ($this->cfgDominio['mover_en_ou']) {
         $grupo = new \LdapPM\Modelos\modeloSambaGroupMapping($this->destino, $this->usuario, $this->password);
         $grupo->setGidNumber($this->entrada['gidNumber']);
         $ou = new \LdapPM\Modelos\modeloOrganizationUnit($this->destino, $this->usuario, $this->password);
         $ou->setOu($grupo->getCn());
         $base = $ou->getDnObjeto();
     } else {
         $base = $this->cfgDominio['base']['shadowAccount'];
     }
     return $this->crearObjetoLdap($base);
 }