The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Redirect Problem after login - 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 Problem after login (/showthread.php?tid=354) |
Redirect Problem after login - Steve_Dickson - 11-20-2016 I have a bit of a problem and can't work out how to fix it. We have a script that let's users go to a dedicated file storage area, the url might be; http://www.mydomain.net/client_files/index.php?dir=ddcf87b6-6c7b-4e42-ab8d-ab5b865d39a9 The way it's setup, if they are sent to that page correctly they cannot access any directory above/beside theirs. If they bookmark that url and try to access it without being logged in, they are redirected to http://www.mydomain.net/client_files/index.php which gives them access to all clients directories. How can I fix this please? Redirect Problem after login - mudmin - 11-20-2016 Seems to me, the simplest way to fix that would be to do one of two things... 1. Go into the admin panel and mark http://www.mydomain.net/client_files/index.php as private as private and only give access to logged in users...that will redirect them to your true homepage (which I'm guessing is http://www.mydomain.net). 2. If that http://www.mydomain.net/client_files/index.php is actually your root userspice index.php, then I would do something like this on your index.php page... Code: if(!$user->isLoggedIn()){ Code: Redirect::to('users/login.php'); Code: } That should redirect anyone who tries to go to that index.php page without being logged in right to the login page. |