Just for certain moderators or the moderator group?
yeah i want show this code for any moderators without use moderator groupid
Quote:
Originally Posted by kh99
There is a function called can_moderate:
Code:
/**
* Returns whether or not the given user can perform a specific moderation action in the specified forum
*
* @param integer Forum ID
* @param string If you want to check a particular moderation permission, name it here
* @param integer User ID
* @param string Comma separated list of usergroups to which the user belongs
*
* @return boolean
*/
function can_moderate($forumid = 0, $do = '', $userid = -1, $usergroupids = '')
{
So for example if you wanted to know if userid has *any* moderator permissions, it would be
Code:
if (can_moderate(0, '', $userid))
{
// code
}
But just so you know, it does do database queries for the info it needs, depending on exactly what parameters you pass to it.
i think is working , but i have problem ... i want show this code for only moderators but it also Shows for admin No other solution if i don't want to use usegroupid