用户找回密码

This commit is contained in:
Zhang Liguo 2023-12-22 00:17:39 +08:00
parent 9f5be5500d
commit 6441997fb0

View File

@ -50,6 +50,7 @@ public class UserServiceImpl implements UserService {
boolean result; boolean result;
User user1; User user1;
result= Pattern.matches("^(\\w+([-.][A-Za-z0-9]+)*){3,18}@\\w+([-.][A-Za-z0-9]+)*\\.\\w+([-.][A-Za-z0-9]+)*$", user.getUserLogin()); result= Pattern.matches("^(\\w+([-.][A-Za-z0-9]+)*){3,18}@\\w+([-.][A-Za-z0-9]+)*\\.\\w+([-.][A-Za-z0-9]+)*$", user.getUserLogin());
user.setUserPassword(MD5Utils.md5(user.getUserPassword()));
if (result == true) { if (result == true) {
user1= userDao.selectByEmail(user.getUserLogin()); user1= userDao.selectByEmail(user.getUserLogin());
if (user1==null){ if (user1==null){