diff options
author | Joas Schilling <coding@schilljs.com> | 2017-05-09 16:59:18 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-05-15 15:41:45 -0500 |
commit | 2dc79efb32ed268637489a5411ca36aed5da9b45 (patch) | |
tree | 8f1140229d5ad8b0e4275e6437a81fc760f27373 /apps/twofactor_backupcodes | |
parent | 2c9007616bc4c985c9e101c5f9c306f42cf211c5 (diff) | |
download | nextcloud-server-2dc79efb32ed268637489a5411ca36aed5da9b45.tar.gz nextcloud-server-2dc79efb32ed268637489a5411ca36aed5da9b45.zip |
Rename the table to a valid name
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/twofactor_backupcodes')
-rw-r--r-- | apps/twofactor_backupcodes/appinfo/database.xml | 2 | ||||
-rw-r--r-- | apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/apps/twofactor_backupcodes/appinfo/database.xml b/apps/twofactor_backupcodes/appinfo/database.xml index 02ca7c93a1e..90a77307688 100644 --- a/apps/twofactor_backupcodes/appinfo/database.xml +++ b/apps/twofactor_backupcodes/appinfo/database.xml @@ -5,7 +5,7 @@ <overwrite>false</overwrite> <charset>utf8</charset> <table> - <name>*dbprefix*twofactor_backup_codes</name> + <name>*dbprefix*twofactor_backupcodes</name> <declaration> <field> <name>id</name> diff --git a/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php b/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php index ff993683c59..03fe7bb5ec8 100644 --- a/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php +++ b/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php @@ -22,13 +22,14 @@ namespace OCA\TwoFactorBackupCodes\Db; use OCP\AppFramework\Db\Mapper; +use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; use OCP\IUser; class BackupCodeMapper extends Mapper { public function __construct(IDBConnection $db) { - parent::__construct($db, 'twofactor_backup_codes'); + parent::__construct($db, 'twofactor_backupcodes'); } /** @@ -40,7 +41,7 @@ class BackupCodeMapper extends Mapper { $qb = $this->db->getQueryBuilder(); $qb->select('id', 'user_id', 'code', 'used') - ->from('twofactor_backup_codes') + ->from('twofactor_backupcodes') ->where($qb->expr()->eq('user_id', $qb->createNamedParameter($user->getUID()))); $result = $qb->execute(); @@ -66,7 +67,7 @@ class BackupCodeMapper extends Mapper { /* @var IQueryBuilder $qb */ $qb = $this->db->getQueryBuilder(); - $qb->delete('twofactor_backup_codes') + $qb->delete('twofactor_backupcodes') ->where($qb->expr()->eq('user_id', $qb->createNamedParameter($uid))); $qb->execute(); } |