You need to sign in to do that
Don't have an account?
Suresh Kalluri
restricting the user from changing the url
Hi All,
I am having community with custom login, for external users.
Once their login is successful, they will be redirected to a visualforce page.If they modify the url, they will be shown the OOB community page, with Home tab etc.
I want to restrict the logged in user from changing the url.
Could you guys help me with this?
Thanks.
I am having community with custom login, for external users.
Once their login is successful, they will be redirected to a visualforce page.If they modify the url, they will be shown the OOB community page, with Home tab etc.
I want to restrict the logged in user from changing the url.
Could you guys help me with this?
Thanks.
You can not stop users from editing URL on browser. Neverthless, you can restrict users from accessing other VF pages by removing access on VF pages from their profile.
Thanks for your reply.
My landing page will be a visualforce page. When the user changes the url, for ex say: by adding /s then he will be shown 'an error message will be shown to user stating that URl does not exist' and he will be shown to Salesforce Home tab, in the community.
But I dont want him to see any other page other than the visualforce page they will be entering after their succeful login.
We can remove access for vf pages, other than the intended. How to prevent them from seeing the out of the box community.
Thanks
You can make a check in controller, if profile is guest and current page URL != "the landing page url" then logout the user.
get current page url : ApexPages.currentPage().getUrl()
For logout : connection.logout();
Refer: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_logout.htm
https://sampleCommunity is my login page.
https://sampleCommunity/apex/page1 is my landing page.
If the user changes the url, https://sampleCommunity/s , he will be able to see the out of the box Home tab.
Could you tell me, where i can check the things you have mentioned?