private function createAdminUserOrg($idOrg, $domain, $CompanyName, $email_contact, $password, $country_code, $area_code, $quota, $sendEmail = false) { $md5password = md5($password); $pACL = new paloACL($this->_DB); $idGrupo = $pACL->getIdGroup("administrator", $idOrg); $exito = $this->createUserOrganization($idOrg, "admin", "Administrator", $md5password, $password, $idGrupo, "100", "200", $country_code, $area_code, "200", "admin", $quota, $lastid, false); if ($exito) { //mostramos el mensaje para crear los archivos de configuracion dentro de asterisk $pAstConf = new paloSantoASteriskConfig($this->_DB); $pAstConf->setReloadDialplan($domain, true); //enviamos un email a la nueva organizacion creada if ($sendEmail == true) { if (!$this->sendEmail($password, $CompanyName, $domain, $email_contact, "create", $error)) { $this->errMsg = "<br />" . _tr("Mail to new admin user couldn't be sent. ") . $error; } else { $this->errMsg = "<br />" . _tr("A email with the password for admin@{$domain} user has been sent to ") . $email_contact; } } return true; } else { //mensaje en caso de que no se pueda crear el usuario administrador de la organizaion $this->errMsg = "<br />Error: " . $this->errMsg; } return false; }