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
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem redirect after login v4.1
#1
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



  Reply
#2
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');
  Reply
#3
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');
  Reply
#4
What version of UserSpice are you running?
  Reply
#5
i was running v4.1 as written in topic Wink
  Reply
#6
Oops Smile I don't see that when I respond remotely. My fault. I've been out of the office on vacation, so I will download a fresh install and double check what's going on.
  Reply
#7
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.
  Reply
#8
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.
  Reply
#9
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.
  Reply
#10
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.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)