From: Roland Haeder Date: Thu, 12 May 2016 19:09:44 +0000 (+0200) Subject: sorted new member X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=083df07ee19dcc0ef2ae060f054dbc57dcded223;p=juser-login-core.git sorted new member --- diff --git a/src/org/mxchange/jusercore/model/user/UserUtils.java b/src/org/mxchange/jusercore/model/user/UserUtils.java index 81749b3..bd2c898 100644 --- a/src/org/mxchange/jusercore/model/user/UserUtils.java +++ b/src/org/mxchange/jusercore/model/user/UserUtils.java @@ -124,10 +124,23 @@ public class UserUtils implements Serializable { return encryptedPassword; } + /** + * Generates a pseudo-random user name + *

+ * @return User name + */ + public static String generateRandomUserName () { + // User name's format is normally "user" + random number (10 digits) + String userName = String.format("user%d", RANDOM_NUMBER_GENERATOR.nextInt(10000000)); //NOI18N + + // Return it + return userName; + } + /** * 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 Whether the password matches @@ -188,19 +201,6 @@ public class UserUtils implements Serializable { return encryptedPassword.equals(container.getUser().getUserEncryptedPassword()); } - /** - * Generates a pseudo-random user name - *

- * @return User name - */ - public static String generateRandomUserName () { - // User name's format is normally "user" + random number (10 digits) - String userName = String.format("user%d", RANDOM_NUMBER_GENERATOR.nextInt(10000000)); //NOI18N - - // Return it - return userName; - } - /** * No instance from this class */