News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Custom Fields from another Table

Started by Spit., June 14, 2016, 11:23:07 AM

Previous topic - Next topic

Spit.

Hi,
I am trying to figure out how to pull custom fields from another table into the fourms.

Example:
I have a site I want people to sign up and choose lets say
Banana or Pineapple  and this is in Table Account
smf_members is the table that has accounts for the forums.
I want to pull what option they chose for the forums from Table Account (Lets day data 1 as field)
And assign them to a hidden member group.

Any help is appreciated :)
 

Spit.

Ok so maybe explain it more. I have a game I am intergrating the user accounts on that to the Fourms so that they can cross reference.

Player Join X Group -> Assigns them to X Group on the fourm only members of that group can see.

Kindred

smf 2.0.x has custom profile fields. The data from those fields is stored in the smf_themes table referenced by the userID and the fieldname
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Spit.

Hi Yes,

So my thing though is its under a table called Account -> username
I need to have this username,password, group and all as the users instead of the
smf_members or what ever the database is. I think it would be easier to pull peoples accounts that way.
Suggestions?

Kindred

My suggestion is, don't do it that way...

Second suggestion... you would have to JOIN  the tables on username, etc...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Spit.

I am assuming using the Foreign Keys on Update.
Also why do you suggest not to do it?
I need users to be placed in specific Forums.

Kindred

Quote from: Spit. on June 15, 2016, 09:12:22 AM
Hi Yes,

So my thing though is its under a table called Account -> username
I need to have this username,password, group and all as the users instead of the
smf_members or what ever the database is. I think it would be easier to pull peoples accounts that way.
Suggestions?

I believe that your assumption about things being easier is incorrect. Why can't you use the SMF members table?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Spit.

Both the forums and my Account Management are in the same database.

I would just like to somehow link the accounts so they can access a private forum by moving them into a group.

Kindred

that's easy...   use smf's security and permissions. :)

basically, the question is  ---- for what reason are you using "account management"? How/why do they have accounts for elsewhere on the site?  What are you using? 
It might be simlper and possibly more secure to use SMF  because one thing we have found is that almost everyone who uses some homegrown account management system is significantly less secure than SMF's built in system (which can be easily extended to pages outside of the forum itself)

IF you continue to insist that you need your existing "account management", then I suggest looking at the API functions...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Spit.

Well the Account management is RSA + AES encryption:

SECURITY:
- RSA 2048 bits and AES 256 bits keys automatically generated on the fly! (Different keys every time for every client session).
- Password salt added automatically
- Password hash: SHA256
- Every information encrypted both sides automatically!
- Full data encryption RSA + AES protocols
- Database SHA256 data encryption
- Restricted server access
- IP surveillance
- Anti-injection system
- Protection against brute force attacks
- Protection against hijacking
- Protection against network eavesdropping

But I was thinking to. Groups have ID numbers and my Guilds/Factions have a ID number so I should be able to align them to each group.

Advertisement: