booruguru / UserPie

PHP login script / user authentication framework
http://userpie.com
Other
137 stars 52 forks source link

Issue in userpage.php #43

Open ivarnasi opened 8 years ago

ivarnasi commented 8 years ago

Below code userpage.php forces the userpage.php to render blank page (no content) on browser since exit() command is not part of if condition. Once I comment that out, or move inside the if condition it works.

if (!isset($loggedInUser))
    header('Location: login.php');

// else // header('Location: /'); exit();

Shouldn't the correct code be:

if (!isset($loggedInUser)) {
    header('Location: login.php');
       exit();
   }

// else // header('Location: /');

fassni commented 8 years ago

Worked great for me! Thanks!

paxfactor commented 8 years ago

I had the same problem, thanks for the suggestion! It works for me.