From: Michael M Slusarz Date: Wed, 22 Jul 2009 18:30:23 +0000 (-0600) Subject: Be consistent with Horde_Auth as to userId usage X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d83123d7d56e5ef0e0dc1415383ff2afcba08d66;p=horde.git Be consistent with Horde_Auth as to userId usage --- diff --git a/imp/lib/Auth.php b/imp/lib/Auth.php index 5ba1d4921..6e967c7ae 100644 --- a/imp/lib/Auth.php +++ b/imp/lib/Auth.php @@ -36,7 +36,7 @@ class IMP_Auth *
      * 'password' - (string) The user password.
      * 'server' - (string) The server key to use (from servers.php).
-     * 'userid' - (string) The username.
+     * 'userId' - (string) The username.
      * 
* * @return boolean True if session was created, false if pre-existing @@ -57,7 +57,7 @@ class IMP_Auth // Check for valid IMAP Client object. if (!$GLOBALS['imp_imap']->ob) { - if (!isset($credentials['userid']) || + if (!isset($credentials['userId']) || !isset($credentials['password'])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } @@ -71,7 +71,7 @@ class IMP_Auth if (!isset($_SESSION['imp'])) { self::_createSession($credentials); $retval = true; - } elseif (!$GLOBALS['imp_imap']->createImapObject($credentials['userid'], $credentials['password'], $credentials['server'])) { + } elseif (!$GLOBALS['imp_imap']->createImapObject($credentials['userId'], $credentials['password'], $credentials['server'])) { self::logMessage('failed', __FILE__, __LINE__); throw new Horde_Auth_Exception('', Horde_Auth::REASON_FAILED); } @@ -184,7 +184,7 @@ class IMP_Auth *
      * 'password' - (string) The user password.
      * 'server' - (string) The server key to use (from servers.php).
-     * 'userid' - (string) The username.
+     * 'userId' - (string) The username.
      * 
* * @throws Horde_Auth_Exception @@ -205,7 +205,7 @@ class IMP_Auth * necessary. */ if (!empty($conf['hooks']['vinfo'])) { try { - $credentials['userid'] = Horde::callHook('_imp_hook_vinfo', array('username', $credentials['userid']), 'imp'); + $credentials['userId'] = Horde::callHook('_imp_hook_vinfo', array('username', $credentials['userId']), 'imp'); } catch (Horde_Exception $e) {} } @@ -219,7 +219,7 @@ class IMP_Auth if (Horde_Auth::getAuth()) { $_SESSION['imp']['uniquser'] = Horde_Auth::removeHook(Horde_Auth::getAuth()); } else { - $_SESSION['imp']['uniquser'] = $credentials['userid']; + $_SESSION['imp']['uniquser'] = $credentials['userId']; if (!empty($ptr['realm'])) { $_SESSION['imp']['uniquser'] .= '@' . $ptr['realm']; } @@ -230,7 +230,7 @@ class IMP_Auth self::authenticate(array( 'password' => $credentials['password'], 'server' => $credentials['server'], - 'userid' => $credentials['userid'] + 'userId' => $credentials['userId'] )); } catch (Horde_Auth_Exception $e) { unset($_SESSION['imp']); diff --git a/imp/lib/api.php b/imp/lib/api.php index 960d94fbe..ba3fcdfcb 100644 --- a/imp/lib/api.php +++ b/imp/lib/api.php @@ -667,7 +667,7 @@ function _imp_authAuthenticate($userId, $credentials) $new_session = IMP_Auth::authenticate(array( 'password' => $credentials['password'], 'server' => empty($credentials['imp_server_key']) ? IMP_Auth::getAutoLoginServer() : $credentials['imp_server_key'], - 'userid' => $userId + 'userId' => $userId )); if ($new_session) {