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,
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();
}
* @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));
}
public function getUID();
/**
- * get the displayname for the user, if no specific displayname is set it will fallback to the user id
+ * get the display name for the user, if no specific display name is set it will fallback to the user id
*
* @return string
*/
public function getDisplayName();
/**
- * set the displayname for the user
+ * set the display name for the user
*
* @param string $displayName
* @return bool
* @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