Blame view
sources/apps/files_encryption/ajax/getMigrationStatus.php
791 Bytes
|
31b7f2792
|
1 2 3 4 5 6 |
<?php /** * Copyright (c) 2013, Bjoern Schiessle <schiessle@owncloud.com> * This file is licensed under the Affero General Public License version 3 or later. * See the COPYING-README file. * |
|
6d9380f96
|
7 |
* check migration status |
|
31b7f2792
|
8 9 10 11 12 13 14 |
*/
use OCA\Encryption\Util;
\OCP\JSON::checkAppEnabled('files_encryption');
$loginname = isset($_POST['user']) ? $_POST['user'] : '';
$password = isset($_POST['password']) ? $_POST['password'] : '';
|
|
a293d369c
|
15 |
$migrationStatus = Util::MIGRATION_COMPLETED; |
|
31b7f2792
|
16 17 18 19 |
if ($loginname !== '' && $password !== '') {
$username = \OCP\User::checkPassword($loginname, $password);
if ($username) {
|
|
6d9380f96
|
20 |
$util = new Util(new \OC\Files\View('/'), $username);
|
|
a293d369c
|
21 |
$migrationStatus = $util->getMigrationStatus(); |
|
31b7f2792
|
22 23 |
} } |
|
a293d369c
|
24 |
\OCP\JSON::success(array('data' => array('migrationStatus' => $migrationStatus)));
|