Advertisement
Guest User

Untitled

a guest
Oct 7th, 2015
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. public class HomePageController {
  2.  
  3. public HomePageController()
  4. {
  5. String unameParam = ApexPages.currentPage().getParameters().get('uname');
  6. if(unameparam == null)
  7. {
  8. // calling logout method to redirect to home page.
  9. Logout();
  10. }
  11. }
  12.  
  13. public PageReference Logout() {
  14. System.debug('RCHOME ###');
  15. PageReference mainHome= Page.rc_home;
  16. mainHome.setRedirect(true);
  17. return mainHome;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement