On Wed, Jan 16, 2013 at 5:04 PM, Brendan Oakley <gent...@gmail.com> wrote: > > I tried changing the mode in > preauth and postauth hooks, since the mode selection seems to get > sucked into the authenticate() method, but the problem there is I > don't see how to get at it where I can change it.
The preauth hook actually works perfectly if you do it right. The examples in hooks.php.dist do not include one which returns the credentials array, so I was doing it wrong. The example in the wiki at the bottom of http://wiki.horde.org/ImapSelect shows how to do this correctly. So now I have this preauth hook: class Horde_Hooks { public function preauthenticate($userID, $credentials) { if ($credentials['mode'] == 'dynamic') { $credentials['mode'] = 'basic'; return array('credentials' => $credentials); } return true; } } Now if dynamic view is selected, you get basic view, but if you select mobile view, you still get mobile view. With the current code, this would seem to be the best way to go about it. No need to hack the source. Thanks Brendan -- imp mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: imp-unsubscr...@lists.horde.org