loginname is not necessarily username
This commit is contained in:
parent
dab3629ff5
commit
ee78d48186
|
@ -10,14 +10,15 @@ use OCA\Encryption\Util;
|
||||||
|
|
||||||
\OCP\JSON::checkAppEnabled('files_encryption');
|
\OCP\JSON::checkAppEnabled('files_encryption');
|
||||||
|
|
||||||
$user = isset($_POST['user']) ? $_POST['user'] : '';
|
$loginname = isset($_POST['user']) ? $_POST['user'] : '';
|
||||||
$password = isset($_POST['password']) ? $_POST['password'] : '';
|
$password = isset($_POST['password']) ? $_POST['password'] : '';
|
||||||
|
|
||||||
$migrationCompleted = true;
|
$migrationCompleted = true;
|
||||||
|
|
||||||
if ($user !== '' && $password !== '') {
|
if ($loginname !== '' && $password !== '') {
|
||||||
if (\OCP\User::checkPassword($user, $password)) {
|
$username = \OCP\User::checkPassword($loginname, $password);
|
||||||
$util = new Util(new \OC_FilesystemView('/'), $user);
|
if ($username) {
|
||||||
|
$util = new Util(new \OC_FilesystemView('/'), $username);
|
||||||
if ($util->getMigrationStatus() !== Util::MIGRATION_COMPLETED) {
|
if ($util->getMigrationStatus() !== Util::MIGRATION_COMPLETED) {
|
||||||
$migrationCompleted = false;
|
$migrationCompleted = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue