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
Rename users folder
#1
Hi guys, what would be the least painful way to rename the "users" folder.
  Reply
#2
Not doing it...

You will run into issues with upgrades (you will always have to do manual upgrades) and I'm pretty sure it could possibly screw up items related to emails, init and z_us_root.

Although @mudmin might be able to provide more exact details on what will happen - I am strongly discouraging it
  Reply
#3
Thanks Brandin, in these lines I have:
<pre>
Code:
$token = Input::get('csrf');
if(Input::exists()){
    if(!Token::check($token)){
        die('Token doesn\'t match!');
    }
}
</pre>


Change them by:
<pre>
Code:
$token = Input::get('csrf');
if(Input::exists()){
    if(!Token::check($token)){
        Redirect::to($us_url_root.'users/accion-no-permitida.php'); <!-- here -->
    }
}
</pre>


It works as a redirect to a page that explains what happened, the question is: Is it the best option?
  Reply
#4
That is what I do as well. I prefer to give the user a reason why a form didn't work as expected, rather than just killing a page because they refreshed when they had POST data already.
  Reply
#5
I agree. I was looking at that the other day. I think we need a more descriptive post. Maybe we can put a hook in usersc that people can grab onto so they can change the message at will.
  Reply
#6
I think it would be pretty painful to rename that folder. Overall, we've worked really hard to give people a clean place to build their project and get as much of the "userspice" out of the way, but that one's pretty difficult.

It's either going to require a big find/replace every time you do an upgrade
OR
There might be a way to redirect people using a .htaccess file.

What about just moving login, join, account.php and profile.php to a different folder? That's what your end users see. It's clunky, but the cleanest thing to do would be to create those filenames in usersc and do

Code:
<?php require_once '../users/init.php';
Code:
Redirect::to("https://mydomain.com/login.php"); ?>
  Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)