Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
return new JSONResponse($this->error($this->l10n->t('Password reset is disabled')));
}
+ $user = trim($user);
+
\OCP\Util::emitHook(
'\OCA\Files_Sharing\API\Server2Server',
'preLoginNameUsedAsUserName',
// FIXME: use HTTP error codes
try {
- $this->sendEmail(trim($user));
+ $this->sendEmail($user);
} catch (ResetPasswordException $e) {
// Ignore the error since we do not want to leak this info
$this->logger->warning('Could not send password reset email: ' . $e->getMessage());