The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (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
Empty login.php
#1
Hi Folks,

I'm trying to change login.php. So I copied it over to the "usersc" folder, but now it comes up empty. So I tried looking for the documentation on customizing the default files, but couldn't find it so far. Can anyone point me in the right direction? thanks!

kind regards,

John
  Reply
#2
Whoops.... (bangs head at wall) seems like including init.php into the "usersc" folder did the trick.
  Reply
#3
Hmm something is strange here,

I assumed I could just use
Code:
$abs_us_root.$us_url_root.'users/init.php'
but this is not working (blank page again)

also I have extra slashes in between my domain name and the directory user spice is installed in.

like this: http://somewebsite/////userspice/usersc/login.php
  Reply
#4
Ahh. So some of the magic in the init file only works AFTER init is included, so you can't use those $abs root things to include it.

Normally in the usersc folder you do

require_once('../users/init.php');

and just use the relative path.

I've been tracking down slash issues. They're different on different servers. The first place I say to check is in usersc/scripts/custom_login_script

and try to see what's up there. You can change the redirect to your actual url if you want...

so

Code:
Redirect::to('http://mydomain.com/users/account.php');

and see if that makes a difference. If it doesn't I may need to talk to you a little bit more about your server setup because I can't duplicate the problem on any of my test systems, but you're not the only one to get that from time to time.
  Reply
#5
Thanks Mudmin for your reply.

I changed the custom_login_script to
Code:
Redirect::to('../');
after login the user should be pointed to the application and nothing else. (the only thing the user must be able to change is the email address and the password. so account.php is not necessary)

the web app that uses userspice is installed to it's own folder. www.example.com/userspice/

I removed all htaccess files so it wouldn't get in the way, but it didn't change a thing.

not related to my question but could you give the forum user some more time to edit the post? I had to make 3 post, which could easily be edited to one..
  Reply
#6
changed to
Code:
Redirect::to('http://mydomain.com/index.php');
nothing changes.

how does the redirect work or where is the actual redirect located? it seems to happen when loggin out and being redirected to the login page.
  Reply
#7
The after login redirect happens in the usersc script.

I believe that the one where you're getting kicked back to the login page if you don't have permission is in the users/includes/us_helpers.php in the securePage function.

I'm starting to think that is the issue in this case. What version are you using?
  Reply
#8
Hi Mudmin,

sorry for my delayed reply, I'm using the 4.1 version. I've edit the /users/index.php and removed
Code:
$us_url_root.
and replaced it with the complete url; now it does redirect correctly without the added slashes. so the problem seems to originate there.
  Reply
#9
Thanks for this! I'm working on a patch!
  Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)