public static function reset_token() {
        global $DB;
        if (!$hub = self::get_registration()) {
            return true;
        }
        $DB->delete_records('registration_hubs', array('id' => $hub->id));
        self::$registration = null;
    }