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
Troubles when making a register form
#12
The token should be generated in the form itself and read in the $_POST section. The class itself is auto-instantiated in the init.

Ok. So let's take a step back. There's a "proper" way to do this that will allow us to help you and make sure our updates don't break your system.

Step 1.
Don't modify anything in the users folder. Leave that alone. We've worked super hard to make sure it's not necessary to change anything there. Maybe the login links in the navigation or something like that, but no "real" editing. To be honest, I think if I wanted ABSOLUTE compatibility, I wouldn't even change the login links. I would create a login.php in usersc and put
<?php require_once '../users/init.php';
Redirect::to('../login.php');

This lets you leave EVERYTHING alone and won't have compatibility options.

Step 2.
You're absolutely fine putting your login file in the root.
In fact, if I take your paste here
http://pasted.co/fd5abeea
and create a login.php file in the root, it works fine for me.

Step 3.
If that paste doesn't work for you... go back and revert any core userspice files you changed because you probably broke something.
Note that my paste from you didn't have your header and footer stuff. See the screenshot...
http://puu.sh/xvC01/7517444e95.png

So, if you revert your files and are still having a problem, then your problem is in the header/footer files that you created (which weren't loaded on my system). Try commenting those out until you can login and that will point you to where your problem is.

Step 4.
Includes. When you're doing include/require once, we have some magic urls that are available to you.
A require once should look like this
Code:
<?php require_once $abs_us_root.$us_url_root.'users/includes/header.php'; ?>
note that there is no / between the us_url_root and users. You can point that wherever you want. It doesn't have to go to the users file, but that formatting will "magically" grab the beginning part of your path so it will always be right.

These are little nit picks, but if you start doing things this way, your life will be INCREDIBLY easier down the road when you try to upgrade and when you want help in the forums.

And as always, I tell newbies with userspice to check out this video on dealing with the database...
https://www.youtube.com/watch?v=rb0kD5tCENM
  Reply


Messages In This Thread
Troubles when making a register form - by JulienS - 09-08-2017, 08:05 PM
Troubles when making a register form - by Brandin - 09-08-2017, 10:35 PM
Troubles when making a register form - by JulienS - 09-09-2017, 11:48 AM
Troubles when making a register form - by mudmin - 09-09-2017, 12:00 PM
Troubles when making a register form - by JulienS - 09-09-2017, 12:17 PM
Troubles when making a register form - by mudmin - 09-09-2017, 12:37 PM
Troubles when making a register form - by JulienS - 09-09-2017, 01:01 PM
Troubles when making a register form - by Brandin - 09-09-2017, 02:18 PM
Troubles when making a register form - by JulienS - 09-09-2017, 02:34 PM
Troubles when making a register form - by Brandin - 09-09-2017, 02:36 PM
Troubles when making a register form - by JulienS - 09-09-2017, 03:49 PM
Troubles when making a register form - by mudmin - 09-09-2017, 04:33 PM
Troubles when making a register form - by JulienS - 09-12-2017, 07:19 PM
Troubles when making a register form - by karsen - 09-12-2017, 07:32 PM
Troubles when making a register form - by JulienS - 09-12-2017, 07:40 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)