diff --git a/plugins/Login/Auth.php b/plugins/Login/Auth.php index e83188a83f536fdf3d8d9d198c76c368ef426e91..1741841038a60d63c44f11cd9d89922d76faf6c6 100644 --- a/plugins/Login/Auth.php +++ b/plugins/Login/Auth.php @@ -86,7 +86,7 @@ class Piwik_Login_Auth implements Piwik_Auth if ($this->token_auth !== null) { - echo "\nROOT LOGIN: '$rootLogin'\nROOT TOKEN: '$rootToken'\nAUTH SUPPLIED: '{$this->token_auth}\n'"; + echo "\nCHECKING AUTH - ROOT LOGIN: '$rootLogin'\nROOT TOKEN: '$rootPassword'\n"; } return new Piwik_Auth_Result( Piwik_Auth_Result::FAILURE, $this->login, $this->token_auth ); diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php index 360e453c288a5945b160d31a8be955bee9d858e3..31ee955d3ce92c91a8b4274c08ae90c4a3a90899 100755 --- a/tests/PHPUnit/IntegrationTestCase.php +++ b/tests/PHPUnit/IntegrationTestCase.php @@ -572,7 +572,12 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase */ public static function getTokenAuth() { - return md5(Zend_Registry::get('config')->superuser->login . Zend_Registry::get('config')->superuser->password); + echo "GETTING TOKEN AUTH - LOGIN: '".Zend_Registry::get('config')->superuser->login."'\n". + "PASSWORD: '".Zend_Registry::get('config')->superuser->password."'\n"; + return Piwik_UsersManager_API::getInstance()->getTokenAuth( + Zend_Registry::get('config')->superuser->login, + Zend_Registry::get('config')->superuser->password + ); } /**