// User did not select whether to link or not link
return badRequest(password_change.render(filledForm));
} else {
final User user = Application.getLocalUser(session());
final String newPassword = filledForm.get().password;
user.changePassword(new MyUsernamePasswordAuthUser(newPassword),
true);
flash(Application.FLASH_MESSAGE_KEY,
Messages.get("playauthenticate.change_password.success"));
return redirect(routes.Application.profile());
}