]> git.mxchange.org Git - juser-activity-core.git/commitdiff
join users in to have users be able to register even when their email address is...
authorRoland Haeder <roland@mxchange.org>
Wed, 14 Oct 2015 12:44:08 +0000 (14:44 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 14 Oct 2015 12:44:08 +0000 (14:44 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jusercore/model/user/LoginUser.java

index c6162dc8cb40aa083fc90c21bdc6f2208f680dcd..3f89337a87c8da3a1ffefcfb3a52b90842b5aae0 100644 (file)
@@ -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")