public function can_favourite_discussion(stdClass $user) : bool {
        $context = $this->get_context();
        return has_capability('mod/forum:cantogglefavourite', $context, $user);
    }
public function can_favourite_discussion(stdClass $user) : bool {
        $context = $this->get_context();
        return has_capability('mod/forum:cantogglefavourite', $context, $user);
    }
public function can_favourite_discussion ( stdClass $ user ) : bool { $ context = $ this -> get_context ( ) ; return has_capability ( 'mod/forum:cantogglefavourite' , $ context , $ user ) ; }
Can the user favourite the discussion

@param stdClass $user The user to check
@return bool
Can the user favourite the discussion