Simplify
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 10 Mar 2010 10:04:14 +0000 (03:04 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 11 Mar 2010 06:17:28 +0000 (23:17 -0700)
imp/lib/Auth.php

index 4fe07b9..6c2ad97 100644 (file)
@@ -95,20 +95,14 @@ class IMP_Auth
             if (!isset($credentials['server'])) {
                 $credentials['server'] = self::getAutoLoginServer();
             }
-            try {
-                self::_createSession($auth_ob->getCredential());
-                return true;
-            } catch (Horde_Auth_Exception $e) {
+        } else {
+            /* Attempt hordeauth authentication. */
+            $credentials = self::_canAutoLogin();
+            if ($credentials === false) {
                 return false;
             }
         }
 
-        /* Attempt hordeauth authentication. */
-        $credentials = self::_canAutoLogin();
-        if ($credentials === false) {
-            return false;
-        }
-
         try {
             self::_createSession($credentials);
             return true;