From 9e7d663e7638bac9add20d82467b8008e5c83e3b Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Sat, 15 Dec 2012 14:09:33 -0500 Subject: [ticket/10758] Spelling fix. PHPBB3-10758 --- phpBB/includes/auth/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/auth/auth.php') diff --git a/phpBB/includes/auth/auth.php b/phpBB/includes/auth/auth.php index e3bccaf47b..1ad9f94d26 100644 --- a/phpBB/includes/auth/auth.php +++ b/phpBB/includes/auth/auth.php @@ -191,7 +191,7 @@ class phpbb_auth /** * Get forums with the specified permission setting - * if the option is prefixed with !, then the result becomes nagated + * if the option is prefixed with !, then the result becomes negated * * @param bool $clean set to true if only values needs to be returned which are set/unset */ -- cgit v1.2.1 From 9a1df948c635d9dbabaff94313652c6d8d1df28d Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Wed, 19 Dec 2012 21:50:03 -0500 Subject: [ticket/10758] Extract obtain_user_data for the benefit of tests. PHPBB3-10758 --- phpBB/includes/auth/auth.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'phpBB/includes/auth/auth.php') 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 @@ -102,6 +102,26 @@ class phpbb_auth return; } + /** + * 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 -- cgit v1.2.1