Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

new registration method

edited February 2011 in Vanilla 2.0 - 2.8
Hi
Could someone explain me a general guideline in order to add a new registration method to Vanilla 2.0.
I’d like to port this plug-in:
http://vanillaforums.org/addon/462-pictcha
for vanilla 2.0 but I can’t find a smart way to do it.
Thanks in advance.
Best

Comments

  • I must look at ReCAPTCHa realization.

    I see that it is used in
    class.entrycontroller.php
    class.usermodel.php
    registercaptcha.php
    registration.php
    functions.validation.php

    I really do not know how to make this via plugin.
    I think that you'll need to add new registration type (to existin ones).
    And somehow add necessary functionality to above files (views part will be yours and will be different).
  • Thanks for the details.

    The problem is if I create a new registration type, it risks being obsolete/incompatible on the next releases of Vanilla.

    But so far it looks like the only option I have.
  • LincLinc Admin
    edited February 2011
    You can create the new registration type by extending the EntryController with a plugin, thus keeping it out of the core code and not causing an issue with future upgrades.

    For instance, you could add an 'Awesome' registration method with a method in your plugin named this: EntryController_RegisterAwesome_Create($Sender) and adding 'Awesome' to the Garden.Registration.Method array in your config file.
  • Thanks Lincoln, but looks like I can't do this because it will always be treated as "Basic".

    In class.entrycon line 769 there is this hard-coded array:

    if (!in_array($RegistrationMethod, array('Closed', 'Basic','Captcha','Approval','Invitation')))
    $RegistrationMethod = 'Basic';

Sign In or Register to comment.