Trying to get an understanding of how $user->data works in phpbb3

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
zeropsi
Registered User
Posts: 36
Joined: Mon Dec 19, 2005 2:30 pm

Trying to get an understanding of how $user->data works in phpbb3

Post by zeropsi » Wed Aug 08, 2018 5:05 pm

I love to try and see how open source software works so that I can try and learn new ways to create code and increase my knowledge with certain programming languages.

I have been digging through phpbb3 code to try and see how it manages sessions and user information through its various classes.

I haven't been able to trace where $user->data is being set throughout any of the classes. Can someone help breakdown how their session management class works in conjunction with their user class?

Most of the files that access the session and user classes start with this code:

Code: Select all

// Start session management
$user->session_begin();
$auth->acl($user->data);
I have been able to trace where the session_begin function sits within the session class and I see that session class extends the user class, but I have not been able to track down where the $user->data is being set or returned.

Anyone have a good break down?

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51320
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Trying to get an understanding of how $user->data works in phpbb3

Post by Brf » Wed Aug 08, 2018 5:35 pm

Line 392 of phpbb\session.php:
$this->data = $db->sql_fetchrow($result);

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: thecoalman and 8 guests