Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

MySQL entry at registration

Asked Modified Viewed 3,117 times
F
Fireant456
F
  • Newbie, joined since
  • Contributed 1 post on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

I want to know how I would go about editing the initial registration code to add a portion that will enter a mysql entry on a defined mysql database. I would like it to take the username being registered and search for it on the database's table and enter a single data value (same for every registrant). If there is no username that matches it will create a new entry.

Please help...:)
0 replies

2 posts

S
skpacman
S
My PHP-Fusion site: https://skpacman.live
  • Member, joined since
  • Contributed 150 posts on the community forums.
  • Started 25 threads in the forums
answered
Member

The *NOT RECOMMENDED* solution that I've implemented on other sites is editing the _setUserDataInput() class in /includes/classes/UserFieldsInput.class.php

This class is triggered when a user's data is entered in the "new_user" table, after it's been checked during registration. I currently use it to email myself when a new user signs up so I can check and approve their account. I'm sure there's infinite possibilities on what you can do in that class.

Again, this method isn't recommended because you have to modify a core file. I can't think of an elegant way to do it without modifying this class. Maybe someone else has a better idea how to do it.
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

To edit the registration form, the only way is to edit the /includes/classes/UserFieldsInput.class.php

User Fields - see how it have been done.

http://www.php-fusion.co.uk/infusions...don_id=286

I wouldn't recommend you to store the user data in another separate table unless really necessary. Why take the long road when maincore.php has to make the query against DB_USERS for authentication and generate a full set of $userdata compulsorily, which is accessible in any file via global $userdata, and extending it will another query load to your server.
0 replies

Category Forum

User Administration - 8

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
S
S
My PHP-Fusion site: https://skpacman.live
  • Member, joined since
  • Contributed 150 posts on the community forums.
  • Started 25 threads in the forums
F
F
  • Newbie, joined since
  • Contributed 1 post on the community forums.
  • Started 1 thread in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet