summaryrefslogtreecommitdiffstats
path: root/core/lostpassword/controller/lostcontroller.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/lostpassword/controller/lostcontroller.php')
-rw-r--r--core/lostpassword/controller/lostcontroller.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/lostpassword/controller/lostcontroller.php b/core/lostpassword/controller/lostcontroller.php
index 7d983bd7e30..0cd6fcd30a4 100644
--- a/core/lostpassword/controller/lostcontroller.php
+++ b/core/lostpassword/controller/lostcontroller.php
@@ -218,13 +218,12 @@ class LostController extends Controller {
throw new \Exception($this->l10n->t('Couldn\'t send reset email. Please make sure your username is correct.'));
}
- $email = $this->config->getUserValue($user, 'settings', 'email');
+ $userObject = $this->userManager->get($user);
+ $email = $userObject->getEMailAddress();
if (empty($email)) {
throw new \Exception(
- $this->l10n->t('Couldn\'t send reset email because there is no '.
- 'email address for this username. Please ' .
- 'contact your administrator.')
+ $this->l10n->t('Could not send reset email because there is no email address for this username. Please contact your administrator.')
);
}