[imp] patch for imp/lib/Auth/imp.php
Chuck Hagenbuch
chuck at horde.org
Wed Oct 22 14:22:18 PDT 2003
Quoting Amith Varghese <amith at xalan.com>:
> This patch enables hordeauth within IMP so that when you login, you don't
> have to login twice when you have the hordeauth parameter set in servers.php.
Why do you set these vars just to use them only once or twice?
+ if (isset($hordeAuth)) {
+ $ptr = &$servers[$server_key];
+ $server = $ptr['server'];
+ $realm = $ptr['realm'];
+ $port = $ptr['port'];
+ $protocol = $ptr['protocol'];
+ $maildomain = $ptr['maildomain'];
+ $namespace = $ptr['namespace'];
+ $folders = $ptr['folders'];
+ if (strcasecmp($hordeAuth, 'full') == 0) {
+ $imapuser = Auth::getAuth();
+ } else {
+ $imapuser = Auth::getBareAuth();
+ }
+ $pass = Auth::getCredential('password');
+ $sessArray = array('realm' => $realm,
+ 'port' => $port,
+ 'protocol' => $protocol,
+ 'maildomain' => $maildomain,
+ 'namespace' => $namespace,
+ 'folders' => $folders);
... the whole thing looks a bit messier than it has to be, and like it
duplicates code elsewhere.
-chuck
--
Charles Hagenbuch, <chuck at horde.org>
Born right the first time.
More information about the imp
mailing list