Skip to content
This repository was archived by the owner on Dec 9, 2025. It is now read-only.

Commit 6ee4f19

Browse files
committed
Add security details to email lookup
1 parent f727420 commit 6ee4f19

File tree

1 file changed

+4
-2
lines changed
  • src/main/java/com/appirio/tech/core/service/identity/dao

1 file changed

+4
-2
lines changed

src/main/java/com/appirio/tech/core/service/identity/dao/UserDAO.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,10 @@ public abstract class UserDAO implements DaoBase<User>, Transactional<UserDAO> {
123123

124124
@RegisterMapperFactory(TCBeanMapperFactory.class)
125125
@SqlQuery("SELECT " + USER_COLUMNS + ", " +
126-
"e.address AS email, e.status_id AS emailStatus " +
127-
"FROM common_oltp.user AS u JOIN common_oltp.email AS e ON e.user_id = u.user_id " +
126+
"s.password AS credential$encodedPassword, e.address AS email, e.status_id AS emailStatus " +
127+
"FROM common_oltp.user AS u " +
128+
"LEFT OUTER JOIN common_oltp.email AS e ON u.user_id = e.user_id AND e.email_type_id = 1 AND e.primary_ind = 1 " +
129+
"LEFT OUTER JOIN common_oltp.security_user AS s ON u.user_id = s.login_id " +
128130
"WHERE LOWER(e.address) = LOWER(:email)")
129131
public abstract List<User> findUsersByEmail(@Bind("email") String email);
130132

0 commit comments

Comments
 (0)