The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.18 (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
Too many redirects
#1
I can login and use my site just fine under the admin user, however if I add an additional user and try to login under that account I get the error of "ERR_TOO_MANY_REDIRECTS" in chrome and any other browser. What might I be doing wrong here? I am on version 4.1.5
  Reply
#2
Hmm, how was the additional user added? As a new registration or through the admin panel?
  Reply
#3
Via the admin panel manually.
  Reply
#4
Okay, and this is a regular User you are trying to login as or a new Administrator? If it is an Administrator, you may need to go and add the User permissions to that account.

Can you describe a bit more of what you do that brings this issue?
  Reply
#5
So yeah this would be a regular user, not admin level.

In custom_login_script.php I have
Code:
Redirect::to($us_url_root.'index.php');
so when the user is done login in it takes them to the main index. Other than some custom navigation I haven't done too much modification.

In my index file I have at the top:
<pre>
Code:
require_once 'users/init.php';
if (!securePage($_SERVER['PHP_SELF'])){die();}
</pre>


The weird thing is the new user can access /users/account.php just not any page outside the /user path it seems where I have specified the above securePage. But again, Admin level has no issues.
  Reply
#6
Okay, I'm just trying to picture it...so you made a change to the custom_login_script.php...no problem there. The index.php file you're talking about is at the base level of your website? Not in users/ or usersc/ right? Again, just trying to picture it.

When admin logs in, it is fine and they can visit pages and things.

When a newly created user logs in, you get a too many redirects error?

What about when the default "user" account logs in?
  Reply
#7
Never mind I'm an idiot! Didn't realize I was needing to add access rights to all the private pages I was creating. That was the issue. Appears admin is added by default to all private pages regardless. Sorry for the hassle.
  Reply
#8
Yes, the default admin account has access to everything (it is part of the securePage function). Glad it is resolved.
  Reply
#9
Dear Brian,

How I add permit for new admin account? I have same problem but I can't solve.

Thanks
  Reply
#10
One way is through the Users panel, select the user, then select the Administrator group to add that user to.
The other way is through the Permissions panel, select Administrator, then select the user and click to add them.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)