Redirect to My Account after signup/login

Hi:

I’ve tested this, and it’s working on v14. After login, system will route navigation to the user form, opening his own record.

You need to edit hooks.py file . It is located under your app folder (yourbench/apps/yourapp/hooks.py). Add a line like this:

app_include_js = "/assets/app_name/js/yourapp.js"

Create a yourapp.js file in yourapp/public/js folder.
In this file, write this

$(document).on("startup", function () {
    frappe.set_route("Form","User",frappe.session.user);
});

Please, note that
yourbench is the name of your bench folder on your server
yourapp should be a custom app to preserve your customization in future updates.

Maybe there is an easier method for achieve your requirement… :slight_smile:
Hope this helps.

4 Likes