Skip to content
Snippets Groups Projects
Commit 06a026a1 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Bugfix: Allowing regular user to change their info

parent 2ebc066f
No related branches found
No related tags found
1 merge request!22Develop
......@@ -229,7 +229,9 @@ public class UserController extends HttpServlet {
FormValidation formValidation = FormValidator.validateForm("userForm",request,getServletContext());
FormField usernameField = formValidation.getFormField("username");
FormField passwordField = formValidation.getFormField("pass1");
String username = usernameField.getWebValue().trim();
String username = (usernameField != null && usernameField.getWebValue() != null && !usernameField.getWebValue().trim().isEmpty()) ?
usernameField.getWebValue().trim()
: null;
String password = (passwordField != null && passwordField.getWebValue() != null && !passwordField.getWebValue().trim().isEmpty()) ?
passwordField.getWebValue().trim()
: null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment