]> git.mxchange.org Git - juser-login-core.git/commitdiff
added named queryfor searching email change by hash
authorRoland Haeder <roland@mxchange.org>
Sun, 13 Mar 2016 13:59:13 +0000 (14:59 +0100)
committerRoland Haeder <roland@mxchange.org>
Sun, 13 Mar 2016 13:59:13 +0000 (14:59 +0100)
src/org/mxchange/jusercore/model/email_address/EmailAddressChange.java
src/org/mxchange/jusercore/model/user/UserUtils.java

index e2b5086075fe9c56f4874ed02c51aa833a33ea97..55b8b2cfd3b20d50ba32832c395036c46e4a3046 100644 (file)
@@ -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 {
index 34f7cd2375946cc7be45ca6acdc429bd917b1cef..d3ad06ccfbb5b33c3ade4abff0c5d27d66e21e66 100644 (file)
@@ -65,10 +65,11 @@ public class UserUtils extends BaseFrameworkSystem {
        /**
         * Checks if password from container matches the updatedUser's password
         * <p>
-        * @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
         * <p>
-        * @return Whethet the password matches
+        * @return Whether the password matches
         */
        public static boolean ifPasswordMatches (final LoginContainer container, final User updatedUser) {
                // Validate parameters