Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   login/signup (http://www.bvlist.com/showthread.php?t=12149)


     
   
bizzarre13 10th September 2019 13:04

login/signup
 
How come users that are already logged in, can access these pages?
How can i redirect already logged in users if they try to access these pages?
login script:
Code:

require_once("include/bittorrent.php");
dbconn();

unset($returnto);
if (!empty($_GET["returnto"])) {
        $returnto = $_GET["returnto"];
        if (!$_GET["nowarn"]) {

        }
}

?>
.:: Login ::.





 

   
   
     
       
               
             
           


         

                                        
               
           


           


                                                  
           


           
             


                  Signup | Recover                                     

         

               

 
   

 


 
   




if (isset($returnto))
        print("\n");



?>

fireknight 10th September 2019 14:07

Simple answer is because they can access the login page ( even when logged in ).


Why == because there is nothing to stop them accessing the page.

You need something to redirect them away from that page.
Not knowing what TBDev version you are using - this is off the top of my head and un tested.


login.php


Find
Code:

require_once("include/bittorrent.php");
dbconn();

Add this below
Code:

if ($CURUSER)
{
    header("Location: index.php");

    exit;
}


Hope this helps.

bizzarre13 10th September 2019 16:46

it works like a charm, thank you!


All times are GMT +2. The time now is 05:34.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.