- adding default value for $recoveryPassword
- set password correctly in lost password
This commit is contained in:
parent
e2327f83ed
commit
a8b6cc6a07
|
@ -20,13 +20,36 @@ use \OC\Core\LostPassword\EncryptedDataException;
|
|||
|
||||
class LostController extends Controller {
|
||||
|
||||
/**
|
||||
* @var \OCP\IURLGenerator
|
||||
*/
|
||||
protected $urlGenerator;
|
||||
|
||||
/**
|
||||
* @var \OCP\IUserManager
|
||||
*/
|
||||
protected $userManager;
|
||||
|
||||
/**
|
||||
* @var \OC_Defaults
|
||||
*/
|
||||
protected $defaults;
|
||||
|
||||
/**
|
||||
* @var IL10N
|
||||
*/
|
||||
protected $l10n;
|
||||
protected $from;
|
||||
protected $isDataEncrypted;
|
||||
|
||||
/**
|
||||
* @var IConfig
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var IUserSession
|
||||
*/
|
||||
protected $userSession;
|
||||
|
||||
public function __construct($appName,
|
||||
|
@ -110,7 +133,7 @@ class LostController extends Controller {
|
|||
throw new \Exception($this->l10n->t('Couldn\'t reset password because the token is invalid'));
|
||||
}
|
||||
|
||||
if (!$user->setPassword($userId, $password)) {
|
||||
if (!$user->setPassword($password)) {
|
||||
throw new \Exception();
|
||||
}
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ class User implements IUser {
|
|||
* @param string $recoveryPassword for the encryption app to reset encryption keys
|
||||
* @return bool
|
||||
*/
|
||||
public function setPassword($password, $recoveryPassword) {
|
||||
public function setPassword($password, $recoveryPassword = null) {
|
||||
if ($this->emitter) {
|
||||
$this->emitter->emit('\OC\User', 'preSetPassword', array($this, $password, $recoveryPassword));
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ interface IUser {
|
|||
* @param string $recoveryPassword for the encryption app to reset encryption keys
|
||||
* @return bool
|
||||
*/
|
||||
public function setPassword($password, $recoveryPassword);
|
||||
public function setPassword($password, $recoveryPassword = null);
|
||||
|
||||
/**
|
||||
* get the users home folder to mount
|
||||
|
|
Loading…
Reference in New Issue