public function isMod($userId = null)
    {
        return (new Query())->from(Mod::tableName())->where(['forum_id' => $this->id, 'user_id' => $userId])->exists();
    }
public function isMod($userId = null)
    {
        return (new Query())->from(Mod::tableName())->where(['forum_id' => $this->id, 'user_id' => $userId])->exists();
    }
public function isMod ( $ userId = null ) { return ( new Query ( ) ) -> from ( Mod :: tableName ( ) ) -> where ( [ 'forum_id' => $ this -> id , 'user_id' => $ userId ] ) -> exists ( ) ; }
Checks if user of given ID is moderator of this forum.
@param int $userId
@return bool
Checks if user of given ID is moderator of this forum .