You need to sign in to do that
Don't have an account?
Jake Jeon
How do I able to set landing page according to user's profile
In order to implement my question, I tried overriding SiteLoginController like as below.
It worked without any problem at first. but when I login again after logout, It seems like forcing to get to the latest page I saw.
Is there any way to make user always redirect to the page I set after login?
global PageReference login() { User getProfile = [SELECT ProfileId FROM User WHERE Username=:username]; if(getProfile.ProfileId == '00e9D000000LswSQAS' || getProfile.ProfileId =='00e9D000000LtAZQA0'){ String tempUrl = '/lightning/n/(pageName)'; return Site.login(username, password, tempUrl); }else{ String startUrl = System.currentPageReference().getParameters().get('startURL'); return Site.login(username, password, startUrl); } }
It worked without any problem at first. but when I login again after logout, It seems like forcing to get to the latest page I saw.
Is there any way to make user always redirect to the page I set after login?