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
custom login redirect is skipped because of login.php?dest=index.php
#1
Hi again,

I've been trying to change the redirection in the login script. So on first login the user is directed to user_settings.php instead of index.php

But if $dest is set, it seems to skip custom_login_script.php. And whenever no one is logged in, the user is always redirected to login.php with destination login.php?dest=index.php.

I've been looking to remove the automatic redirection of $dest, but I fail to see where this part of the URL is created.

So if I'm not logged in and go to my "domain.com/userspice/" it willl auto redirect to "domain.com/userspice/users/login.php?dest=index.php" and custom_login fails to load and the user is redirected to index.php

if I go to "domain.com/userspice/users/login.php" everything is fine, and on first login I'm redirected to user_settings.php
  Reply
#2
Hmm. That's obviously a bug. I'm not in front of my code, but I'm almost positive that would be in users/classes/User.php where that would be happening. I'll take a look.
  Reply
#3
I guess this function is responsible?


version 4.1 -> Line 149

<pre>
Code:
public function notLoggedInRedirect($location){
        if($this->_isLoggedIn){
            return true;
        }else{
            Redirect::to($location);
        }
    }
</pre>



Not sure though, I'm still getting familiar with UserSpice... I'll just wait for when you find the time to take a look.
  Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)