From: Arthur Schiwon Date: Thu, 28 Nov 2013 12:26:31 +0000 (+0100) Subject: loginname is not necessarily username X-Git-Tag: v6.0.0RC2~16^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ee78d4818607d9af18a4b045ff9e11caea563069;p=nextcloud-server.git loginname is not necessarily username --- diff --git a/apps/files_encryption/ajax/getMigrationStatus.php b/apps/files_encryption/ajax/getMigrationStatus.php index 4da035a97d4..17469a1af0c 100644 --- a/apps/files_encryption/ajax/getMigrationStatus.php +++ b/apps/files_encryption/ajax/getMigrationStatus.php @@ -10,14 +10,15 @@ use OCA\Encryption\Util; \OCP\JSON::checkAppEnabled('files_encryption'); -$user = isset($_POST['user']) ? $_POST['user'] : ''; +$loginname = isset($_POST['user']) ? $_POST['user'] : ''; $password = isset($_POST['password']) ? $_POST['password'] : ''; $migrationCompleted = true; -if ($user !== '' && $password !== '') { - if (\OCP\User::checkPassword($user, $password)) { - $util = new Util(new \OC_FilesystemView('/'), $user); +if ($loginname !== '' && $password !== '') { + $username = \OCP\User::checkPassword($loginname, $password); + if ($username) { + $util = new Util(new \OC_FilesystemView('/'), $username); if ($util->getMigrationStatus() !== Util::MIGRATION_COMPLETED) { $migrationCompleted = false; }