MyBB Community Forums

Full Version: Add members to mybb object
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello

I'm integrating mybb with my website. It's convenient because I just use the mybb registration and log in. I'm also just adding tables and fields to the current mybb database (although these additions are not for my forums, rather, they are for my website).

What I want to know now is, how can I add new members to the mybb object? For instance, mybb->users['username'] is for the username. I basically want to add fields such as privilege or rank or things similar to this. Which files should I edit?

Thanks a lot

* Thought I had to clear this up. By members I do not mean people who visit my website, I mean "fields" or variables/properties of a the mybb object.
Are you going to add some fields while registration ? If so, you need to change member.php file.

Also mybb->users['username'] is incorrect. Correct is mybb->user['username']
Oh yes, I meant to say mybb->user['username']. Basically, I have a log in on my site (separate from the login on the forums). That works fine already.

And about the fields I want to add, it's just extra information about the user.

What I basically want to know, is there an object or class definition
such as
class mybb
{
//properties
//methods
}
or something that I can edit.
You can access any column in the mybb_users table (assuming mybb_ is the prefix) through $mybb->user['column_name']. If you really need to edit it, it's in inc/class_session.php in the load_user() function.
(2011-03-21, 07:01 PM)Jammerx2 Wrote: [ -> ]You can access any column in the mybb_users table (assuming mybb_ is the prefix) through $mybb->user['column_name']. If you really need to edit it, it's in inc/class_session.php in the load_user() function.

Thanx a lot for the helpful reply Smile