The following warnings occurred: | ||||||||||||||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
![]() |
problem redirect after login v4.1 - 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: problem redirect after login v4.1 (/showthread.php?tid=393) Pages:
1
2
|
problem redirect after login v4.1 - ummagumma - 12-16-2016 i have my userspice in a folder called system just unpacked and renamed userspice folder to system before installation. when i go to mydomain.xxx/system page load index.php so far so good i click login and is send to /system/users/login.php here i enter name and password but instead of go to account.php it give error The requested URL /users/account.php was not found on this server. it just forget to use whole path /system/users/account.php tried to fix it but no luck problem redirect after login v4.1 - mudmin - 12-16-2016 What happens if you go to usersc/scripts/custom_login_script.php and after //note that this path is relative from the userc/scripts folder, hence the ../../ put Redirect::to('http://mydomain.xxx/system/users/account.php'); problem redirect after login v4.1 - ummagumma - 12-16-2016 Thank you. It did not solve it but send me in the right direction so found the problem. i changed your code in custom_login_script.php from Redirect::to('../../users/account.php'); to Redirect::to('../users/account.php'); problem redirect after login v4.1 - mudmin - 12-16-2016 What version of UserSpice are you running? problem redirect after login v4.1 - ummagumma - 12-17-2016 i was running v4.1 as written in topic ![]() problem redirect after login v4.1 - mudmin - 12-17-2016 Oops ![]() problem redirect after login v4.1 - met00cigar - 12-20-2016 just loaded 4.1. similar problem. admin works just fine. I just added a new admin user login with the new admin user and get a URL that looks like http://spice.domain.com//////////users/index.php modified usersc/scripts/custom_login_script.php to redirect as you stipulate in #3182 with the hardcoded path. problem redirect after login v4.1 - met00cigar - 12-20-2016 more... from http://spice.domain.com/ login redirected to http://spice.domain.com///////////users/account.php back button to http://spice.domain.com/ shows logged in as user (admin user) Select "account" directed to http://spice.domain.com///////////users/account.php go back in browser select "Admin Dashboard" directed to: http://spice.domain.com/users/admin.php select anything "manage" on the page gets directed to the correct domain and file. Seems to only happen to account.php even after logged in. problem redirect after login v4.1 - mudmin - 12-23-2016 Sorry for the slow response. I wanted to make sure I was able to recreate your situation. What do you have in the /usersc/scripts/custom_login_script.php file? It should be Code: Redirect::to('../../users/account.php'); If you have that, then the next place I would look is your .htaccess file. I'm guessing that you have some form of URL rewriting on that's getting in the way. Try renaming .htaccess to something else and see what happens. problem redirect after login v4.1 - met00cigar - 12-26-2016 vi custom_login_script.php --- <?php //Whatever you put here will happen after the username and password are verified and the user is "technically" logged in, but they have not yet been redirected to their starting page. This gives you access to all the user's data through $user->data() //Where do you want to redirect the user after login //note that this path is relative from the userc/scripts folder, hence the ../../ Redirect::to('../../users/account.php'); ?> There is no .htaccess file in / or in /users although there is one in /usersc but all it has is "options -indexes" in it. |