1

Topic: 'users' Table Explained

I have some questions about how the php code interacts with the 'users' table.

group_id
It looks like new users start out with their group_id='32000', and once they reply to the welcome email and login for the first time, their account is activated and their group_id becomes '4'?

If I register a new user by submitting their email and username through the register form (same as they would), then go into the database via phpMyAdmin and change their group_id from 32000 to 4, will that cause any problems?

The second part of that question is, do I even need to change group_id to 4?  I'm building a new topic by hand (that originated in an email thread) by posting the posts myself, then going into the database and changing the 'poster' from me to the new user who hasn't activated his account yet.  (In the 'posts' table, I edit 'poster', 'poster_id', and 'posted'.)  In the 'users' table I've been editing 'num_posts' and 'group_id'.  Is it OK to leave 'group_id' as 32000 and only edit 'num_posts'?

Re: 'users' Table Explained

D9r wrote:

group_id
It looks like new users start out with their group_id='32000', and once they reply to the welcome email and login for the first time, their account is activated and their group_id becomes '4'?

Yes. 32000 is the identifier for an unconfirmed account.

If I register a new user by submitting their email and username through the register form (same as they would), then go into the database via phpMyAdmin and change their group_id from 32000 to 4, will that cause any problems?

It shouldn't

The second part of that question is, do I even need to change group_id to 4?  I'm building a new topic by hand (that originated in an email thread) by posting the posts myself, then going into the database and changing the 'poster' from me to the new user who hasn't activated his account yet.  (In the 'posts' table, I edit 'poster', 'poster_id', and 'posted'.)  In the 'users' table I've been editing 'num_posts' and 'group_id'.  Is it OK to leave 'group_id' as 32000 and only edit 'num_posts'?

I don't think it needs to be changed. num_posts should do really.

Re: 'users' Table Explained

Connor's plugin might help you set the number of posts: AP_Forum_cleanup

Directly changing the DB is fine, but I'll mention one of my plugins too: AP_Author_Update

4

Re: 'users' Table Explained

Great, then I'll leave 'group_id' as is.  The less work the better.  I suppose it might make a difference if I were to delete users who haven't activated their accounts after a certain amount of time, and use '32000' to select them, but I don't anticipate doing that at the moment.

activate_string and activate_key
What do they do?  On my forum, out of 38 users only 4 users have values for 'activate_string' and 'activate_key'.  2 users are activated/confirmed and have posted, and the other 2 users are not activated/confirmed.

Re: 'users' Table Explained

http://punbb.org/docs/dev.html#dbtables read this? wink

6 (edited by D9r 2006-11-16 23:17)

Re: 'users' Table Explained

Oops.  thanks.  yeah, I read that back when I installed the forum, but I forgot.  sorry.

temporary storage string for new passwords and new e-mail addresses

It sounds like they're used when users request a new password or change their email.

Thanks everyone for your help!
And those plugins that guardian34 suggested sound good - I'll have to try them out.

Re: 'users' Table Explained

D9r wrote:

Oops.  thanks.  yeah, I read that back when I installed the forum, but I forgot.  sorry.

np, if you have further questions just ask, I just wanted to make sure you knew they were there wink