DISQUS

echo "hey, it works" > /dev/null: Registration plugin for Habari - echo "hey, it works" > /dev/null

  • Andy C · 1 year ago
    Although I don't have legions of fans wishing to register for my 'make money blogging' series of articles and counselling classes, even I can see the wide potential for the use of this plugin..

    OK - I admit it - ACL was a good idea . Without it, this would have been non-trivial, I suspect :-)
  • michaeltwofish · 1 year ago
    True, it would have been ... interesting without groups and the ACL. In fact, the ACL is quite hidden in this, but the exciting bit. Registering is dull, but registering into a group that has privileges is powerful. Let users register to a group that has access to open new tickets on the tracker implemented on Habari, or edit wiki pages, or comment or ... your imagination can run wild :)
  • miklb · 1 year ago
    Excellent plugin and great explanation. I wish more people who were adding plugins to -extras would write up at least a description if not a full explanation, at least until we get hp.o sorted out.

    Thanks for the plugin and for taking the time to write it up.
  • ringmaster · 11 months ago
    Nice!

    One thing you might consider is that the FormUI object you create and pass around is the actual original FormUI object, and the full instance is passed to register_user() (your on_success() callback function) when the form succeeds at submission. If you set options on the form when you create it, you should be able to recall them from your success callback, since that's the same form object. For example, setting the group into the object in the get_form() method:

    $form->set_option('my_group', $group);

    And then calling it back out from inside the register_user() on_success method:

    $group = $form->get_option('my_group');

    No encryption required, no hacker tampering possible, because it all passes behind the curtain.

    I can also see this easily having an option added to let you select the group that a user would be added to by default if the group parameter was omitted from the call to $theme->registration(). It would be pretty trivial to add.
  • michaeltwofish · 11 months ago
    Ah, that's great info, thanks Owen. Still, it was entertaining to get my head around the encryption stuff.

    The other thing I'd like to do is have plugin hooks for the form construction and saving, so that other plugins can alter the form, adding other fields etc.

    Of course, the plugin is in -extras, so if anyone feels like making those changes, feel free :)