From: Roland Haeder Date: Wed, 14 Oct 2015 12:44:08 +0000 (+0200) Subject: join users in to have users be able to register even when their email address is... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=94279e4e101cc64c6c2de9008ac95029b4aca00f;p=juser-activity-core.git join users in to have users be able to register even when their email address is already added Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index c6162dc..3f89337 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -63,7 +63,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; @NamedQueries ( { @NamedQuery (name = "AllUserNames", query = "SELECT DISTINCT u.userName FROM users AS u ORDER BY u.userId ASC"), - @NamedQuery (name = "AllEmailAddresses", query = "SELECT DISTINCT c.contactEmailAddress FROM contacts AS c ORDER BY c.contactId ASC"), + @NamedQuery (name = "AllEmailAddresses", query = "SELECT DISTINCT c.contactEmailAddress FROM contacts AS c INNER JOIN users AS u ON u.userContact = c ORDER BY c.contactId ASC"), @NamedQuery (name = "SearchUserName", query = "SELECT u FROM users AS u WHERE LOWER(u.userName) LIKE LOWER(:param)"), @NamedQuery (name = "SearchEmailAddress", query = "SELECT u FROM users AS u INNER JOIN contacts AS c ON u.userContact = c WHERE LOWER(c.contactEmailAddress) LIKE LOWER(:param)"), @NamedQuery (name = "AllPublicUsers", query = "SELECT u FROM users AS u WHERE u.userAccountStatus = :CONFIRMED AND u.userPublicProfile = TRUE")