소스 검색

small fix

andre 5 년 전
부모
커밋
7f87ea8571
1개의 변경된 파일12개의 추가작업 그리고 3개의 파일을 삭제
  1. 12 3
      zimbraSingle.php

+ 12 - 3
zimbraSingle.php

@@ -743,7 +743,10 @@ function zimbraSingle_ServiceSingleSignOn($params) {
             'Error: cannot login to ' . $params['serverhostname'],
             $login->getMessage()
         );
-        return $login->getMessage();
+        return array(
+            'success' => false,
+            'redirectTo' => '',
+        );
     }
     $apiDomainManager = new Zm_Domain($api);
     $domainOptions = $apiDomainManager->getDomainOptions($params['customfields']['maildomain']);
@@ -755,7 +758,10 @@ function zimbraSingle_ServiceSingleSignOn($params) {
             'Error : could not fetch options for ' . $params['customfields']['maildomain'],
             $domainOptions->getMessage()
         );
-        return $domainOptions->getMessage();
+        return array(
+            'success' => false,
+            'redirectTo' => '',
+        );
     }
     $preAuthKey = $domainOptions['zimbraPreAuthKey'];
     $apiAccountManager = new Zm_Account($api);
@@ -768,7 +774,10 @@ function zimbraSingle_ServiceSingleSignOn($params) {
             'Error: could not gather informations for ' . $params['username'],
             $accountInfo
         );
-        return false;
+        return array(
+            'success' => false,
+            'redirectTo' => '',
+        );
     }
     $webmailUrl = zimbraSingleFindAll($accountInfo, 'PUBLICMAILURL');
     $timestamp=time()*1000;