[imp] implementing 'realm' support in IMP 6.1
Enrico Scholz
enrico.scholz at sigma-chemnitz.de
Wed Jun 5 15:59:02 UTC 2013
Hi,
with horde/imp 6.0 I use a horde/hooks.php with
----
class Horde_Hooks
{
public function authusername($userId, $toHorde)
{
if ($toHorde) {
$server = IMP_Imap::loadServerConfig($GLOBALS['auth_params']['imp_server_key']);
if ($server && $server['realm']) {
/* required for logins on webfrontend */
$realm = $server['realm'];
} else {
/* required for logins via activesync */
$imap = $GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create();
switch ($imap->ob->getParam('port')) {
case 1430: $realm = '...realmA...'; break;
case 1431: $realm = '...otherealmB...'; break;
----
Unfortunately, this does not work anymore with imp 6.1. Now, I get
| PHP Fatal error: Cannot use object of type IMP_Imap_Config as array
| PHP Fatal error: Call to a member function getParam() on a non-object in
in the corresponding branch.
What would be the best way to express this with 6.1? Upgrade notes do
not mention an API change there.
Enrico
More information about the imp
mailing list