Fix check for user existence

This commit is contained in:
Victor Dubiniuk 2014-06-03 23:32:19 +03:00 committed by Morris Jobke
parent 47c6fd0c85
commit 59ff71f781
1 changed files with 2 additions and 1 deletions

View File

@ -118,7 +118,8 @@ class LostController extends Controller {
throw new EncryptedDataException();
}
if (!$this->userClass->userExists($user)) {
$userClass = $this->userClass;
if (!$userClass::userExists($user)) {
throw new \Exception($this->l10n->t('Couldnt send reset email. Please make sure your username is correct.'));
}
$token = hash('sha256', \OC_Util::generateRandomBytes(30));