Browse Source
Merge pull request #3989 from YevhenBondarenko/improvements
reset password improvements
pull/4014/head
Igor Kulikov
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
0 deletions
-
dao/src/main/java/org/thingsboard/server/dao/user/UserServiceImpl.java
|
|
|
@ -186,6 +186,7 @@ public class UserServiceImpl extends AbstractEntityService implements UserServic |
|
|
|
public UserCredentials requestPasswordReset(TenantId tenantId, String email) { |
|
|
|
log.trace("Executing requestPasswordReset email [{}]", email); |
|
|
|
validateString(email, "Incorrect email " + email); |
|
|
|
DataValidator.validateEmail(email); |
|
|
|
User user = userDao.findByEmail(tenantId, email); |
|
|
|
if (user == null) { |
|
|
|
throw new IncorrectParameterException(String.format("Unable to find user by email [%s]", email)); |
|
|
|
|