public function isMod($userId = null)
    {
        if (User::can(Rbac::ROLE_ADMIN)) {
            return true;
        }
        if (in_array($userId, $this->forum->getMods())) {
            return true;
        }
        return false;
    }
public function isMod($userId = null)
    {
        if (User::can(Rbac::ROLE_ADMIN)) {
            return true;
        }
        if (in_array($userId, $this->forum->getMods())) {
            return true;
        }
        return false;
    }
public function isMod ( $ userId = null ) { if ( User :: can ( Rbac :: ROLE_ADMIN ) ) { return true ; } if ( in_array ( $ userId , $ this -> forum -> getMods ( ) ) ) { return true ; } return false ; }
Checks if user is this thread moderator.
@param int $userId
@return bool
Checks if user is this thread moderator .