Enforce string as passed type
This commit is contained in:
parent
ba52f6f8fc
commit
d869f8212b
1 changed files with 13 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue