andre 5 rokov pred
rodič
commit
25108e340c
1 zmenil súbory, kde vykonal 10 pridanie a 4 odobranie
  1. 10 4
      api/Zm/Account.php

+ 10 - 4
api/Zm/Account.php

@@ -298,16 +298,22 @@ class Zm_Account
 
 	/**
 	 * getMailbox
-	 * @param string $name account name
+	 * @param string $idOrNameAccount account id or account name
 	 * @return string account informations
 	 */
-	function getMailbox($name)
+	function getMailbox($idOrNameAccount, $type="auto")
 	{
+		if($type == "auto")
+			$realType = getAccountType($idOrNameAccount);
+		else
+			$realType = $type;
+		if($realTyp = 'name')
+			$id = $this->getAccountId($idOrNameAccount);
+
 		$result = null;
 		
-//		$id = getAccountId($name);
 		$params = array(
-			new SoapVar('<ns1:mbox id=' . $name . '</ns1:mbox>', XSD_ANYXML),
+			new SoapVar('<ns1:mbox id=' . $id . '</ns1>', XSD_ANYXML),
 		);
 
 		try