From 909e20fa58475809c6d76ba12252bf027e4ae3b6 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sun, 13 Mar 2016 14:59:13 +0100 Subject: [PATCH] added named queryfor searching email change by hash --- .../jusercore/model/email_address/EmailAddressChange.java | 3 ++- src/org/mxchange/jusercore/model/user/UserUtils.java | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/org/mxchange/jusercore/model/email_address/EmailAddressChange.java b/src/org/mxchange/jusercore/model/email_address/EmailAddressChange.java index e2b5086..55b8b2c 100644 --- a/src/org/mxchange/jusercore/model/email_address/EmailAddressChange.java +++ b/src/org/mxchange/jusercore/model/email_address/EmailAddressChange.java @@ -48,7 +48,8 @@ import org.mxchange.jusercore.model.user.User; @NamedQueries ( value = { @NamedQuery (name = "SearchEmailChangeByEmail", query = "SELECT e FROM email_changes AS e WHERE LOWER(e.emailAddress) LIKE LOWER(:email)"), - @NamedQuery (name = "AllEmailAddressChanges", query = "SELECT e.emailAddress FROM email_changes AS e ORDER BY e.emailChangeId ASC") + @NamedQuery (name = "AllEmailAddressChanges", query = "SELECT e.emailAddress FROM email_changes AS e ORDER BY e.emailChangeId ASC"), + @NamedQuery (name = "SearchEmailChangeByHash", query = "SELECT e FROM email_changes AS e WHERE e.emailChangeHash = :hash") } ) public class EmailAddressChange implements ChangeableEmailAddress { diff --git a/src/org/mxchange/jusercore/model/user/UserUtils.java b/src/org/mxchange/jusercore/model/user/UserUtils.java index 34f7cd2..d3ad06c 100644 --- a/src/org/mxchange/jusercore/model/user/UserUtils.java +++ b/src/org/mxchange/jusercore/model/user/UserUtils.java @@ -65,10 +65,11 @@ public class UserUtils extends BaseFrameworkSystem { /** * Checks if password from container matches the updatedUser's password *

- * @param container Container holding user instance and unencrypted password + * @param container Container holding user instance and unencrypted + * password * @param updatedUser Updated user instance from database *

- * @return Whethet the password matches + * @return Whether the password matches */ public static boolean ifPasswordMatches (final LoginContainer container, final User updatedUser) { // Validate parameters -- 2.39.5