diff options
Diffstat (limited to 'phpBB/includes/auth/auth.php')
-rw-r--r-- | phpBB/includes/auth/auth.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/includes/auth/auth.php b/phpBB/includes/auth/auth.php index 1ad9f94d26..2535247571 100644 --- a/phpBB/includes/auth/auth.php +++ b/phpBB/includes/auth/auth.php @@ -103,6 +103,26 @@ class phpbb_auth } /** + * Retrieves data wanted by acl function from the database for the + * specified user. + * + * @param int $user_id User ID + * @return array User attributes + */ + public function obtain_user_data($user_id) + { + global $db; + + $sql = 'SELECT user_id, username, user_permissions, user_type + FROM ' . USERS_TABLE . ' + WHERE user_id = ' . $user_id; + $result = $db->sql_query($sql); + $user_data = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + return $user_data; + } + + /** * Fill ACL array with relevant bitstrings from user_permissions column * @access private */ |