protected function validate_baseurl($value) {
        global $CFG;
        include_once($CFG->dirroot . '/lib/validateurlsyntax.php');
        if (!empty($value) && !validateUrlSyntax($value, 'S+')) {
            return new lang_string('sslonlyaccess', 'error');
        }
        return true;
    }
protected function validate_baseurl($value) {
        global $CFG;
        include_once($CFG->dirroot . '/lib/validateurlsyntax.php');
        if (!empty($value) && !validateUrlSyntax($value, 'S+')) {
            return new lang_string('sslonlyaccess', 'error');
        }
        return true;
    }
protected function validate_baseurl ( $ value ) { global $ CFG ; include_once ( $ CFG -> dirroot . '/lib/validateurlsyntax.php' ) ; if ( ! empty ( $ value ) && ! validateUrlSyntax ( $ value , 'S+' ) ) { return new lang_string ( 'sslonlyaccess' , 'error' ) ; } return true ; }
Custom validator for end point URLs.
Because we send Bearer tokens we must ensure SSL.

@param string $value The value to check.
@return lang_string|boolean
Custom validator for end point URLs . Because we send Bearer tokens we must ensure SSL .