Skip to main content
Topic: Access to the login page even when the user is logged in. (Read 1181 times) previous topic - next topic

Access to the login page even when the user is logged in.

When the user is logged in and type in address bar: "my_site / index /" the user return to the login page again. I believe that code need to verify the state of login, and in case of user is logged in, the login page performs a automatic redirection to the home page.

 

Re: Access to the login page even when the user is logged in.

Reply #1
When the user is logged in and type in address bar: "my_site / index /" the user return to the login page again. I believe that code need to verify the state of login, and in case of user is logged in, the login page performs a automatic redirection to the home page.

Solution: Open the file "\app\views\ partials\index\index.php and add the following code:

Code: [Select]
<?php 
                 if(user_login_status() == true )
                 {
                      redirect_to_page("home");
                 }
            ?>