diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-10-19 22:44:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-19 22:44:41 +0300 |
commit | 6029f2c118c6ce3af4ef9b4e35a230b2faed744b (patch) | |
tree | d588865e23aee723261e941836f4f5cfede200f8 /plugins | |
parent | 514a0fc2d492d93303f8b2fd25f3961ef68e18b2 (diff) |
Fix check if table exists (#16581)
* Fix check if table exists
* add comment to avoid user input
* fix query was not working
Co-authored-by: Thomas Steur <tsteur@users.noreply.github.com>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Login/Auth.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/Login/Auth.php b/plugins/Login/Auth.php index 9ee44e3642..bab7c8f47f 100644 --- a/plugins/Login/Auth.php +++ b/plugins/Login/Auth.php @@ -10,6 +10,7 @@ namespace Piwik\Plugins\Login; use Piwik\AuthResult; use Piwik\Auth\Password; +use Piwik\Common; use Piwik\Date; use Piwik\DbHelper; use Piwik\Piwik; @@ -65,7 +66,7 @@ class Auth implements \Piwik\Auth } } catch (\Zend_Db_Statement_Exception $e) { // user_token_auth table might not yet exist when updating to Matomo 4 - if (strpos($e->getMessage(), 'user_token_auth') && !DbHelper::tableExists('user_token_auth')) { + if (strpos($e->getMessage(), 'user_token_auth') && !DbHelper::tableExists(Common::prefixTable('user_token_auth'))) { return new AuthResult(AuthResult::SUCCESS, 'anonymous', 'anonymous'); } |