Changeset 702 for trunk/forum/includes/auth.php
- Timestamp:
- Mar 31, 2010, 6:32:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/forum/includes/auth.php
r400 r702 3 3 * 4 4 * @package phpBB3 5 * @version $Id : auth.php 8985 2008-10-09 13:18:38Z acydburn$5 * @version $Id$ 6 6 * @copyright (c) 2005 phpBB Group 7 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License … … 65 65 66 66 $cache->put('_acl_options', $this->acl_options); 67 $this->acl_cache($userdata);68 } 69 elseif (!trim($userdata['user_permissions']))67 } 68 69 if (!trim($userdata['user_permissions'])) 70 70 { 71 71 $this->acl_cache($userdata); … … 609 609 // Now grab group settings - non-role specific... 610 610 $sql_ary[] = 'SELECT ug.user_id, a.forum_id, a.auth_setting, a.auth_option_id' . $sql_opts_select . ' 611 FROM ' . ACL_GROUPS_TABLE . ' a, ' . USER_GROUP_TABLE . ' ug ' . $sql_opts_from . '611 FROM ' . ACL_GROUPS_TABLE . ' a, ' . USER_GROUP_TABLE . ' ug, ' . GROUPS_TABLE . ' g' . $sql_opts_from . ' 612 612 WHERE a.auth_role_id = 0 ' . 613 613 (($sql_opts_from) ? 'AND a.auth_option_id = ao.auth_option_id ' : '') . ' 614 614 AND a.group_id = ug.group_id 615 AND g.group_id = ug.group_id 615 616 AND ug.user_pending = 0 617 AND NOT (ug.group_leader = 1 AND g.group_skip_auth = 1) 616 618 ' . (($sql_user) ? 'AND ug.' . $sql_user : '') . " 617 619 $sql_forum … … 620 622 // Now grab group settings - role specific... 621 623 $sql_ary[] = 'SELECT ug.user_id, a.forum_id, r.auth_setting, r.auth_option_id' . $sql_opts_select . ' 622 FROM ' . ACL_GROUPS_TABLE . ' a, ' . USER_GROUP_TABLE . ' ug, ' . ACL_ROLES_DATA_TABLE . ' r' . $sql_opts_from . '624 FROM ' . ACL_GROUPS_TABLE . ' a, ' . USER_GROUP_TABLE . ' ug, ' . GROUPS_TABLE . ' g, ' . ACL_ROLES_DATA_TABLE . ' r' . $sql_opts_from . ' 623 625 WHERE a.auth_role_id = r.role_id ' . 624 626 (($sql_opts_from) ? 'AND r.auth_option_id = ao.auth_option_id ' : '') . ' 625 627 AND a.group_id = ug.group_id 628 AND g.group_id = ug.group_id 626 629 AND ug.user_pending = 0 630 AND NOT (ug.group_leader = 1 AND g.group_skip_auth = 1) 627 631 ' . (($sql_user) ? 'AND ug.' . $sql_user : '') . " 628 632 $sql_forum … … 826 830 // Now grab group-specific permission settings 827 831 $sql = 'SELECT a.forum_id, a.auth_option_id, a.auth_role_id, a.auth_setting 828 FROM ' . ACL_GROUPS_TABLE . ' a, ' . USER_GROUP_TABLE . ' ug 832 FROM ' . ACL_GROUPS_TABLE . ' a, ' . USER_GROUP_TABLE . ' ug, ' . GROUPS_TABLE . ' g 829 833 WHERE a.group_id = ug.group_id 834 AND g.group_id = ug.group_id 830 835 AND ug.user_pending = 0 836 AND NOT (ug.group_leader = 1 AND g.group_skip_auth = 1) 831 837 AND ug.user_id = ' . $user_id; 832 838 $result = $db->sql_query($sql);
Note:
See TracChangeset
for help on using the changeset viewer.