From: Roland Haeder Date: Sun, 13 Mar 2016 13:59:13 +0000 (+0100) Subject: added named queryfor searching email change by hash X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=909e20fa58475809c6d76ba12252bf027e4ae3b6;p=juser-core.git added named queryfor searching email change by hash --- 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