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?

--
  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]

Reply via email to