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
/printthread.php 16 require_once



UserSpice
adduser.php not working - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: adduser.php not working (/showthread.php?tid=398)



adduser.php not working - Brandin - 12-18-2016

Hi there!

As per previous conversations I had informed you guys that I had moved the
Code:
adduser
portion of the
Code:
admin_users.php
page to its own page. Everything was fine and dandy, until I removed some of the table columns I felt weren't needed. This is what the structure of the users table is now:
http://hastebin.com/enigihigax.lisp

So now, when I try to add a user, it will no longer insert to the DB. It will perform the permission and profile DB queries, but inserts a row with no user_id because it doesn't exist. Ultimately I can change the structure back, I just really didn't wanna have to.

Any help would be greatly appreciated!

Thanks.


adduser.php not working - mudmin - 12-18-2016

I would say deleting from the user table is pretty dangerous because the system makes assumptions that those fields will be there. You can always add columns, bu taking away doesn't enhance security or performance in any measurable way.

If you want to try to leave them out, does your "try" block still contain company and stripe_cust_id because those two are in the admin_users.php one and not in your db so they would cause it to fail. If it were me, though, I would just restore the deleted columns.



adduser.php not working - Brandin - 12-18-2016

Hey,

It was definitely the DB. I had a backup so I dumped the structure into a new table, copied the data over and renamed the table, and everything works fine now. For future reference, don't ever mess with the tables haha.

Thanks!