You need to sign in to do that
Don't have an account?
Abhilash Mishra 13
redirecting on the same page after login
I am using standard sitelogincontroller class
I have tried using startulr=apexpages.currentpage(),geturl() but this didn't work.
Need help
Urgent
Thanks
** * An apex page controller that exposes the site login functionality */ global with sharing class SiteLoginController { global String username {get; set;} global String password {get; set;} global PageReference login() { String startUrl = System.currentPageReference().getParameters().get('startURL'); return Site.login(username, password, startUrl); } global SiteLoginController () {} }Every time i login it redirect me to site home page. but i want to redirect on the very same page not on site home page.
I have tried using startulr=apexpages.currentpage(),geturl() but this didn't work.
Need help
Urgent
Thanks
All Answers
Thanks For the reply. but its not what i am looking for. Login link is on every page of the site. so can not really fix the value of start url. i want to redirect on the same page from wich login is done.