Give specific group permissions

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
Tarantino
Registered User
Posts: 874
Joined: Sat Feb 18, 2012 1:51 pm

Give specific group permissions

Post by Tarantino »

Hi guys, I want to give to a specific group with id 9, the same ability that admins and mods have to see hidden profiles.

I discover this line on phpbb/profilefields/manager.php:

Code: Select all

case 'profile':
				// Show hidden fields to moderators/admins
				if (!$this->auth->acl_gets('a_', 'm_') && !$this->auth->acl_getf_global('m_'))
				{
					$sql_where .= ' AND f.field_show_profile = 1';
				}
How can I add the group id 9 to that code?

I don't mind to do core edit on this.
Tarantino
Registered User
Posts: 874
Joined: Sat Feb 18, 2012 1:51 pm

Re: Give specific group permissions

Post by Tarantino »

If I add this && $this->user->data['group_id']!=9 it works only with the default group. It would be better to work with all groups. But how?
Tarantino
Registered User
Posts: 874
Joined: Sat Feb 18, 2012 1:51 pm

Re: Give specific group permissions

Post by Tarantino »

Ok I was able to solve it.

I was using && !group_memberships(9,$this->user->data['user_id'],true) and getting an 500 error, but after seen the log, i understand what was missing :lol:

So after adding this to the begin on function:

Code: Select all

if ( !function_exists('group_memberships') )
		{
			include('./includes/functions_user.php');
		}
All worked :P
Post Reply

Return to “phpBB Custom Coding”