Skip to content

Commit

Permalink
Merge pull request #2960 from SCADA-LTS/fix/#2905_Fixed_Go_to_my_defa…
Browse files Browse the repository at this point in the history
…ult_page_after_change_Home_page

#2905 Fixed 'Go to my default page' after change 'Home page'
  • Loading branch information
Limraj authored Jul 23, 2024
2 parents 12e5103 + ad4d4c4 commit bcd7892
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/com/serotonin/mango/web/dwr/MiscDwr.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
Expand Down Expand Up @@ -253,6 +252,7 @@ public void setLocale(String locale) {


public void setHomeUrl(String url) {
Permissions.ensureValidUser();
// Remove the scheme, domain, and context if there.
HttpServletRequest request = WebContextFactory.get()
.getHttpServletRequest();
Expand All @@ -276,6 +276,10 @@ public void setHomeUrl(String url) {
url = url.substring(1);

// Save the result
User user = Common.getUser();
user.setHomeUrl(url);
UserService userService = new UserService();
userService.saveHomeUrl(user.getId(), url);
new UserDao().saveHomeUrl(Common.getUser().getId(), url);
}

Expand Down

0 comments on commit bcd7892

Please sign in to comment.