Re: [webmin-devel] Anonymous Account Activation

"Bill Moyers" <[email protected]>
Newsgroups gmane.comp.web.webmin.devel
Message-ID <[email protected]>
> If you are implementing this as Virtualmin plugin (with a
> virtual_feature.pl file), you can have your own input fields added to the
> mailbox user form by defining the mailbox_inputs function in
> virtual_feature.pl . This is the recommended method, as it removes the
> need to modify the core Virtualmin code, and so will continue to work even
> after an upgrade.
>
> For details on writing plugins, go to
> http://www.virtualmin.com/documentation/ and then to the plugin
> developer's documentation.

Jamie, you're right. I didn't know about the mailbox_inputs function in
the docs. Thanks, that solves that problem.

Also, we'd like to inject into the user creation email a variable
containing a link to the activation page. Looking through the docs and the
source, I don't see any way that plugins can change the substitution hash
for template emails.

If such a thing doesn't exist, maybe there could be another function in
the virtual_feature.pl api such as mailbox_email_substitutions which
returns a hash of additional email substitution variables and is called by
send_template_email. I can see how potentially other plugins might want to
be able to do this as well, but you might not agree that it's important
enough to warrant changing the core.

The only solution I can see without such a function is to have
mailbox_save actually insert the link directly into the template email,
but that's bad because there's no (I think) guarantee that the save will
be called before the email is sent, and it's just an ugly solution.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.