Question about available variables...

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
Browner87
Registered User
Posts: 15
Joined: Tue Sep 23, 2008 2:16 am

Question about available variables...

Post by Browner87 »

I am trying to write a simple script. If the user is in a certain group (for example, group_id = 5), then something happens. What exactly is the code for this? I had this code, but then realized that it used user_id instead of group_id. What is the variable for group_id?

Code: Select all

$user->setup('viewtopic'); 
			    	if ($user->data['group_id'] == 5)
			    	{
					$something = true;
			    	}

I guess what I'm really trying to do is fix a line of code inn a MOD. PLEASE DON'T JUST LINK ME TO THE MOD'S FORUM! It's basically abandoned it seems.

It uses the line of code

$auth->acl_get('u_title_edit')

but that always seems to return false for some reason. Why? Can someone explain exactly what this line is doing to me? I'm a good programmer, I just have 0 experience in MySQL and only a little bit in PHP and I don't understand it exactly.
Browner87
Registered User
Posts: 15
Joined: Tue Sep 23, 2008 2:16 am

Re: Question about available variables...

Post by Browner87 »

whoops :oops: nevermind - I had permissions set up wrong for the user...
Locked

Return to “[3.0.x] Support Forum”