Skip to content

Commit

Permalink
Set default locale when creating account based on setting in wise.pro…
Browse files Browse the repository at this point in the history
…perties.
  • Loading branch information
hirokiterashima committed Sep 18, 2018
1 parent e54407f commit 48fccec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Expand Up @@ -115,6 +115,7 @@ public synchronized String createStudent(
birthday.set(Calendar.MONTH, birthmonth-1); // month is 0-based
birthday.set(Calendar.DATE, birthdate);
userDetails.setBirthday(birthday.getTime());
userDetails.setLanguage(wiseProperties.getProperty("defaultLocale", "en"));

studentAccountFormValidator.validate(accountForm, result);
if (result.hasErrors()) {
Expand Down
Expand Up @@ -169,6 +169,7 @@ protected String createNewTeacher(
try {
userDetails.setDisplayname(userDetails.getFirstname() + " " + userDetails.getLastname());
userDetails.setEmailValid(true);
userDetails.setLanguage(wiseProperties.getProperty("defaultLocale", "en"));
User createdUser = this.userService.createUser(userDetails);
NewAccountEmailService newAccountEmailService = new NewAccountEmailService(createdUser, request.getLocale(), request);
Thread thread = new Thread(newAccountEmailService);
Expand Down

0 comments on commit 48fccec

Please sign in to comment.