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
create a custom database entry
#1
can you guide me through custom database entry which is needed during registration??
  Reply
#2
I just want to be clear...are you wondering how to add custom fields to the registration form? Things like addresses and stuff like that and store them in the database?
  Reply
#3
i am wondering the same thing. adding a field and storing it in the dbase
  Reply
#4
The join.php form is a little bit more complicated than the other forms in userspice. Basically, you want to add a new field to the join form, let's say "address."

Then you want to make a new column in the users table called "address."

Then the quickest thing to do is to go into classes/User.php and in the create method add a line like

Code:
$query3 = $this->_db->insert("users",['address'=>$address);

That's the quick and dirty way to do it.
  Reply
#5
I should add that the proper way to modify the join form is to copy it to the usersc folder and point the init.php to the proper location.

Also, in the (Very rare) event that we update the user class, your change will be overwritten, but I don't see that happening. You'll also be notified if an update changes a class.
  Reply
#6
@mudmin,

Looks like we got some spammers!

Thank you,
  Reply
#7
Yeah. There's something about this post that keeps attracting them. I've stepped up the spam protection. We'll see.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)