We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

what function, class, method, or hook do i need | Forum

dave Leader
dave Jun 27 '13

i want to add the check to see if a member is a moderator.  I have found several hooks, and public functions in the 1.5.3 install.

 

I need to know which hooks, functions, classes or methods do i need to tap into in order to check a user for current moderator status.

 

thanks.

The Forum post is edited by dave Jun 27 '13
dave Leader
dave Jul 1 '13

any info on this thanks.

Daisy Team
Daisy Jul 3 '13
Dave, you can find all authorization methods in /ow_system_plugins/base/bol/authorization_service.php file.

If I took you wrong, please provide me with more details.
dave Leader
dave Jul 3 '13

Thanks Daisy, i ended up using this  

 

 $isModerator = OW::getUser()->isAuthorized('base'); 

 

assuming all moderators will have a minimum of base authorization.

Daisy Team
Daisy Jul 4 '13
Dave, the moderators can be assigned for, let's say, the forum or group only, so then they will not match this expression.

Base attribute means that these moderators are authorized to moderate users' profiles only.
dave Leader
dave Jul 4 '13

Yes but this does work for me because base is the default, all moderators for me will have the minimum of base and more if necessary.   I am using this for the IP tracker plugin.  Because i want my moderators to be able to see the IP and check the ip before approving.  So this works in my case.  

 

The reason i had to do i this way is because isModerator did not work, it gave me a invalid method which surprised me because i thought the BOL and dao and common primary calls were basic to all plugins but i guess not.

The Forum post is edited by dave Jul 10 '13
Daisy Team
Daisy Jul 10 '13
Dave, you could check for all plugins (forum, blogs, etc.) using this way:  $isModerator = OW::getUser()->isAuthorized('base');.

Anyway, I am glad to hear that it works for you. I hope my directions helped you to achieve these results. :)
dave Leader
dave Jul 10 '13

Thank you daisy for your assistance :)