Revision 49769
Added by Sofia Baltzi over 6 years ago
RegisterServlet.java | ||
---|---|---|
51 | 51 |
String username = request.getParameter("username"); |
52 | 52 |
String email =request.getParameter("email"); |
53 | 53 |
String confirmEmail = request.getParameter("email_conf"); |
54 |
//String password = request.getParameter("password");
|
|
55 |
//String confirmPassword = request.getParameter("password_conf");
|
|
54 |
String password = request.getParameter("password"); |
|
55 |
String confirmPassword = request.getParameter("password_conf"); |
|
56 | 56 |
|
57 | 57 |
if (organization == null){ |
58 | 58 |
logger.info("organization is null"); |
59 | 59 |
} |
60 | 60 |
if (firstName != null && lastName != null && username != null && |
61 |
email.equals(confirmEmail) /*&& password.equals(confirmPassword)*/ ) {
|
|
61 |
email.equals(confirmEmail) && password.equals(confirmPassword) ) {
|
|
62 | 62 |
|
63 | 63 |
try { |
64 | 64 |
|
65 | 65 |
if (username.matches("^[a-zA-Z0-9][a-zA-Z0-9_-]{4,150}") && !ldapActions.usernameExists(username) && !ldapActions.emailExists(email)) { |
66 | 66 |
|
67 |
ldapActions.createUser(username, email, firstName, lastName, organization/*, password*/);
|
|
67 |
ldapActions.createUser(username, email, firstName, lastName, organization, password);
|
|
68 | 68 |
logger.info("User successfully created"); |
69 | 69 |
|
70 | 70 |
UUID verificationCode = UUID.randomUUID(); |
Also available in: Unified diff
Add registerSuccess.jsp