The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
Redirect to my account.php - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: Redirect to my account.php (/showthread.php?tid=826)



Redirect to my account.php - shoropio - 11-12-2017

What would be the best way to redirect the user
logged in that by error visit login.php


Redirect to my account.php - mudmin - 11-12-2017

Code:
if(isset($user) && $user->isLoggedIn()){
Code:
Redirect::to('yourpage.php);
Code:
}

Let me know if you have any issues.


Redirect to my account.php - mudmin - 11-12-2017

Code:
if(isset($user) && $user->isLoggedIn()){
Code:
Redirect::to('yourpage.php);
Code:
}

Let me know if you have any issues.


Redirect to my account.php - shoropio - 11-13-2017

Login as admin and then I visit from my address bar to login.php and redirection does not occur.

<pre>
Code:
if(isset($user) && $user->isLoggedIn()){
Redirect::to('yourpage.php');
}
</pre>



Redirect to my account.php - Brandin - 11-13-2017

If you hit login.php it's possible it's killing your session? Is the redirect working from any other pages?


Redirect to my account.php - shoropio - 11-13-2017

It works! Perfect, it did not work because of human error. I thank you so much mudmin and brandin, Pura Vida!