Enforce string as passed type

This commit is contained in:
Lukas Reschke 2015-04-09 10:45:50 +02:00
parent ba52f6f8fc
commit d869f8212b

View file

@ -2,6 +2,7 @@
/**
* @author Björn Schießle <schiessle@owncloud.com>
* @author Clark Tomlinson <fallen013@gmail.com>
* @author Lukas Reschke <lukas@owncloud.com>
*
* @copyright Copyright (c) 2015, ownCloud, Inc.
* @license AGPL-3.0
@ -28,7 +29,6 @@ use OCP\AppFramework\Controller;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IRequest;
use OCP\JSON;
use OCP\AppFramework\Http\DataResponse;
class RecoveryController extends Controller {
@ -59,6 +59,12 @@ class RecoveryController extends Controller {
$this->recovery = $recovery;
}
/**
* @param string $recoveryPassword
* @param string $confirmPassword
* @param string $adminEnableRecovery
* @return DataResponse
*/
public function adminRecovery($recoveryPassword, $confirmPassword, $adminEnableRecovery) {
// Check if both passwords are the same
if (empty($recoveryPassword)) {
@ -89,6 +95,12 @@ class RecoveryController extends Controller {
}
}
/**
* @param string $newPassword
* @param string $oldPassword
* @param string $confirmPassword
* @return DataResponse
*/
public function changeRecoveryPassword($newPassword, $oldPassword, $confirmPassword) {
//check if both passwords are the same
if (empty($oldPassword)) {