1

I have been told here how to restrict logged in users from the login page and I've also been told to make a new question, so here I am.

How can I restrict users from certain pages, either logged in users from more than the login page, or not logged in users from pages like 'my profile' without having to write a check in every controller?

Community
  • 1
  • 1
George Irimiciuc
  • 4,573
  • 8
  • 44
  • 88

1 Answers1

0
if(isset($_SESSION["user"]))
{
    header('index.php');
}

Will sent user back to index.php

  • 1
    hmm i think OP is looking for a more robust solution using the symfony framework... i think you may have missed the link to his previous question – some_groceries Aug 21 '15 at 11:08