Excellent idea.  I'd like to request that registration and
logins/authentication also be customizable via plugins/events.

I recently implemented new registration and login functionality for my
site (LDAP integration), and I noticed that there are events in place
for some of the registration form, but it's not enough to get the
customization I needed.

To reduce the number of lines of code I had to change in the original
source (to make future updates / merges as easy as possible), I ended up
with this little hack:  I renamed the RegisterAction class and provided
my own implementation:

in actions/register.php

        class RegisterAction__original extends Action

then in my plugin code:

        class RegisterAction extends RegisterAction__original

That required only one line to change, and it's not likely to cause
issues pulling new code from mainline.  Then I could still leverage much
of the base functionality from the RegisterAction class, but override as
much as I needed to.

I mention this to illustrate that the current plugin / event mechanism
may not be enough to provide all the hooks people might want.  Perhaps
the plugin could also specify alternate class names to instantiate for
given actions?  Then I could just define my CustomRegisterAction class
to extend RegisterAction, and not have to touch the original source at all.

Thanks for the work on the plugins so far, it has definitely helped.


Jeremy


Evan Prodromou wrote:
> I'd like to set a goal for the 0.9.x release (July, probably) that all
> optional functionality (XMPP, Twitter, Facebook, SMS) be built as plugins.
> 
> Is that reasonable? I think we'll have to develop new events to make it
> work (including some events for ooffline queues), and some offline
> scripts (like the XMPP receiving script) would have to be outside of
> plugins, but otherwise I think it would be the right thing to do.
> 
> -Evan
> 
> _______________________________________________
> Laconica-dev mailing list
> [email protected]
> http://mail.laconi.ca/mailman/listinfo/laconica-dev

_______________________________________________
Laconica-dev mailing list
[email protected]
http://mail.laconi.ca/mailman/listinfo/laconica-dev

Reply via email to