Explorar el Código

try new mailboxcheck

andre hace 5 años
padre
commit
540181593c
Se han modificado 1 ficheros con 6 adiciones y 9 borrados
  1. 6 9
      zimbraAddressCheck.php

+ 6 - 9
zimbraAddressCheck.php

@@ -1,20 +1,17 @@
 <?php
+define("CLIENTAREA", true);
+require_once(__DIR__ . '/../../../init.php');
+require_once(ROOTDIR . '/includes/dbfunctions.php');
+require_once dirname(__FILE__) . '/zimbraSingle.inc';
+
 $allowed_host = 'admin.seecure.ch';
 $host = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST);
-
 if(substr($host, 0 - strlen($allowed_host)) != $allowed_host) {
   die("This file cannot be accessed directly");
 }
-require_once("api/Zm/Auth.php");
-require_once("api/Zm/Account.php");
 
-$account_name = $_GET['name'] . "@" .  $_GET['domain'];
-$api = new Zm_Auth('192.168.16.225', 'admin@thurdata.local', 'Technics2312', "admin");
-$login = $api->login();
-$apiAccountManager = new Zm_Account($api);
-if( $apiAccountManager->accountExists($account_name)) {
+if(zimbraSingleDoesEMailExist($_GET['name'], $_GET['domain'])) {
 	echo 'no';
 } else {
 	echo 'yes';
 }
-