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

Discussion forum for MOD Writers regarding MOD Development.
francois44
Registered User
Posts: 8
Joined: Sat Apr 18, 2015 9:34 am

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

Post 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
User avatar
Jackanape
Registered User
Posts: 1076
Joined: Wed Oct 13, 2004 6:01 am
Location: Capitol of the Great State of New York
Name: Jack Drury

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

Post 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
~Extending the rule of meticulous exactitude to exaspirating punctillio...still.~
Treat your phpBB like a member of the family--Update and MOD her by hand, with HTML-Kit
: : Wanna Talk Poker? : : Image : :
francois44
Registered User
Posts: 8
Joined: Sat Apr 18, 2015 9:34 am

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

Post 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

Return to “[3.0.x] MOD Writers Discussion”