diff options
author | Joas Schilling <coding@schilljs.com> | 2017-05-15 12:37:16 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-05-18 10:49:04 +0200 |
commit | 2259140e3b0157bd6acc80418c80a5ec05796993 (patch) | |
tree | 487242af78fdbc71b7a1af853a6d5b9917a687f1 /lib/private/Repair | |
parent | 0e325756c384b1bbf1fdd8cc9ad7857aa2d43b53 (diff) | |
download | nextcloud-server-2259140e3b0157bd6acc80418c80a5ec05796993.tar.gz nextcloud-server-2259140e3b0157bd6acc80418c80a5ec05796993.zip |
Add some more casting
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Repair')
-rw-r--r-- | lib/private/Repair/Owncloud/SaveAccountsTableData.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Repair/Owncloud/SaveAccountsTableData.php b/lib/private/Repair/Owncloud/SaveAccountsTableData.php index f441462435a..35e5560856b 100644 --- a/lib/private/Repair/Owncloud/SaveAccountsTableData.php +++ b/lib/private/Repair/Owncloud/SaveAccountsTableData.php @@ -144,7 +144,8 @@ class SaveAccountsTableData implements IRepairStep { * @throws \UnexpectedValueException */ protected function migrateUserInfo(IQueryBuilder $update, $userdata) { - if ($userdata['state'] === '3') { + $state = (int) $userdata['state']; + if ($state === 3) { // Deleted user, ignore return; } @@ -158,10 +159,9 @@ class SaveAccountsTableData implements IRepairStep { if ($userdata['last_login'] !== null) { $this->config->setUserValue($userdata['user_id'], 'login', 'lastLogin', $userdata['last_login']); } - if ($userdata['state'] === '1') { + if ($state === 1) { $this->config->setUserValue($userdata['user_id'], 'core', 'enabled', 'true'); - } - if ($userdata['state'] === '2') { + } else if ($state === 2) { $this->config->setUserValue($userdata['user_id'], 'core', 'enabled', 'false'); } |