Page 1 of 1

In ACP how can i know if user is a Moderator or Administrator?

Posted: Sat Apr 18, 2015 10:04 am
by francois44
I have successfully used in topics or forum template U_ACP and U_MCP
to test if user is moderator or administrator to costumize my templates
no problem in the forum but in ACP, those 2 variables are empty.
I'm working on template acp_users_profiles.html and when I print them, there are empty

I want to create my own variable but i want to write a clean modification.
In which file php and where (linenumber) i could create my own variable ?
Perhaps, is it in a function php used just when login in ACP is ok ?
If those variable are set up after logging, I should test them in all the template of ACP.

(for example in my forum, moderator are allowed to modify value of CUSTOM_PROFILE_FIELDS
but not alowed to modify CUSTOM_PROFILE_FIELDS (create, delete)
and standard PERMISSIONS doesn't
(other example, a special CUSTOM_PROFILE_FIELDS should not be modified by moderator)

Sorry for my english which is not very fluent
Francois

Re: In ACP how can i know if user is a Moderator or Administrator?

Posted: Wed Apr 22, 2015 11:54 am
by Jackanape
I would look into adding a new permission set, instead. Check out the wiki for details:

https://wiki.phpbb.com/Tutorial.Permiss ... permission

Re: In ACP how can i know if user is a Moderator or Administrator?

Posted: Sun Apr 26, 2015 9:52 am
by francois44
Thanks you Jackanape for your answer.
I am going to add the new permission to customize the forum.
I agree with you it's the best solution.
Fran├žois