On Wed, 28 Nov 2012, Leena Heino wrote:
On Fri, 17 Aug 2012, Andrew Morgan wrote:public function authusername($userId, $toHorde) { if ($toHorde) { // Put the domain on from backends.local.php$imap = $GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create();$hostspec = $imap->ob->getParam('hostspec'); $servers = IMP_Imap::loadServerConfig(); foreach ($servers as $server) { if ($server['hostspec'] == $hostspec) { $userId = $userId . '@' . $server['realm']; break; } } return $userId; } else { // strip the domain off $userId = substr($userId, 0, strpos($userId, '@')); return $userId; } }Is there any way to make this work with IMP 6.0?
It seems that when the $GLOBALS['injector'] -> getInstance('IMP_Factory_Imap') -> create() is called from Horde's hooks it behaves differently in IMP 5 than it does in IMP 6. In IMP 5 the create() call populates the newly created IMP_Imap object, where as create() in IMP 6 it leaves the newly created IMP_Imap object unpopulated and null.
Is it possible to restore IMP 6 $GLOBALS['injector'] -> getInstance('IMP_Factory_Imap') -> create() call to work as it did
in IMP 5? -- Leena Heino University of Tampere / Computer Centre ( liinu at uta.fi ) ( http://www.uta.fi/laitokset/tkk ) -- imp mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: [email protected]
