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
not_logged_in $dest
#1
Hello,

How can I use the not_logged_in.php script to redirect to a page in usersc called landing and have the dest?

I want to use the landing in place of the registration and login pages, but I need the dest passed over.

I had this:
Code:
Redirect::to('/usersc/landing.php?dest='.$dest)
but it doesn't work since $dest is not defined obviously
  Reply
#2
I guess thinking about it, the Redirect message on line 434 of us helpers (in v4.3) should probably be (have been) in the not_logged_in script. I'm guessing we wouldn't have a problem moving that safely as long as we notify people during the upgrade in case they've modified it.
  Reply
#3
Sounds good to me - let me know if you are planning on doing this or not so I can deploy it in my project if you aren't going to.
  Reply
#4
I'll do it. It would be a pain to have to keep patching manually for every update of us_helpers.
  Reply
#5
@Mudmin

This was what we wanted to do with the login function I think (you had emailed me)
  Reply
#6
Ok. Sweet. I'll take a look. Thanks!
  Reply
#7
I don't think a change is needed there. If yo go into the blank not_logged_in.php page, you can do

Code:
dnd($page);

And you will have access to the page the person was trying to go to.

So you can do
Code:
$dest = sanitizedDest($page);
Code:
Redirect::to('/usersc/landing.php?dest='.$dest)

Is that what you were trying to do?
  Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)