Fix logging in if vinfo doesn't exist (Bug #8444).
authorJan Schneider <jan@horde.org>
Mon, 20 Jul 2009 13:16:46 +0000 (15:16 +0200)
committerJan Schneider <jan@horde.org>
Mon, 20 Jul 2009 13:16:46 +0000 (15:16 +0200)
imp/lib/Session.php

index 76a0053..6003fe5 100644 (file)
@@ -80,7 +80,10 @@ class IMP_Session
          * necessary. */
         if (!empty($conf['hooks']['vinfo'])) {
             try {
-                $imapuser = Horde::callHook('_imp_hook_vinfo', array('username', $imapuser), 'imp');
+                $newUser = Horde::callHook('_imp_hook_vinfo', array('username', $imapuser), 'imp');
+                if (strlen($newUser)) {
+                    $imapuser = $newUser;
+                }
             } catch (Horde_Exception $e) {}
         }