We have a few plugins for password change using different methods for saving new password, but all of them have the same UI. I think it would be better for localization and future maintenance to join them into one plugin with many drivers. We need one function for password change, so we can do this as simple as possible. Let's add drivers/ directory with files sql.php, sasl.php, etc. and config option 'password_driver'. So, everyone just could add his own driver function.
My second idea is to create hooks for rcube_user's email2user and user2email functions. Then we could move current virtuser_* features into 'virtuser' plugin. This plugin should also work as password above with drivers for file, sql, or any callback.
On Sun, 14 Jun 2009 11:31:54 +0200, "A.L.E.C" alec@alec.pl wrote:
We have a few plugins for password change using different methods for saving new password, but all of them have the same UI. I think it would be better for localization and future maintenance to join them into one plugin with many drivers. We need one function for password change, so we can do this as simple as possible. Let's add drivers/ directory with files sql.php, sasl.php, etc. and config option 'password_driver'. So, everyone just could add his own driver function.
I think this is a really good idea. It should be pritty simple to implement too. One thing though, any suggestions how the config is handeled? Each driver will need its own set of configs. Is it OK to just set them at the top of the driver file?
Phil _______________________________________________ List info: http://lists.roundcube.net/dev/
Could you please consider my hMail password change plugin (attached) as well?
Also please notice the following part of code:
if (!$rcmail->config->get('db_persistent')) {
if ($dsn = $rcmail->config->get('db_dsnw')) {
$rcmail->db = new rcube_mdb2($dsn, '', FALSE);
}
}
I had problems with the default password plugin structure, if database connection is not persistent.
Problems disappeared by establishing a database connection to roundcube database after connecting to hMail database.
Regards, Roland
----- Original Message ----- From: "A.L.E.C" alec@alec.pl To: "RoundCube Dev" dev@lists.roundcube.net Sent: Sunday, June 14, 2009 11:31 AM Subject: [RCD] Password plugin and virtuser plugin ideas
We have a few plugins for password change using different methods for saving new password, but all of them have the same UI. I think it would be better for localization and future maintenance to join them into one plugin with many drivers. We need one function for password change, so we can do this as simple as possible. Let's add drivers/ directory with files sql.php, sasl.php, etc. and config option 'password_driver'. So, everyone just could add his own driver function.
My second idea is to create hooks for rcube_user's email2user and user2email functions. Then we could move current virtuser_* features into 'virtuser' plugin. This plugin should also work as password above with drivers for file, sql, or any callback.
-- Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252 LAN Management System Developer http://lms.org.pl Roundcube Webmail Developer http://roundcube.net _______________________________________________ List info: http://lists.roundcube.net/dev/
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/ng/nfc6f8ra/hmail_password.zip Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
A.L.E.C wrote:
We have a few plugins for password change using different methods for saving new password, but all of them have the same UI. I think it would be better for localization and future maintenance to join them into one plugin with many drivers. We need one function for password change, so we can do this as simple as possible. Let's add drivers/ directory with files sql.php, sasl.php, etc. and config option 'password_driver'. So, everyone just could add his own driver function.
Excellent idea. To configure it you suggest to use a local config file with in the plugin directory, right?
My second idea is to create hooks for rcube_user's email2user and user2email functions. Then we could move current virtuser_* features into 'virtuser' plugin. This plugin should also work as password above with drivers for file, sql, or any callback.
I agree to create hooks for these functions but why not creating diffrent plugins for file and sql backends? I think the code for both will be completely different.
~Thomas _______________________________________________ List info: http://lists.roundcube.net/dev/
Thomas Bruederli wrote:
Excellent idea. To configure it you suggest to use a local config file with in the plugin directory, right?
Implemented in r2664. Waiting for more drivers ;)
My second idea is to create hooks for rcube_user's email2user and user2email functions. Then we could move current virtuser_* features into 'virtuser' plugin. This plugin should also work as password above with drivers for file, sql, or any callback.
I agree to create hooks for these functions but why not creating diffrent plugins for file and sql backends? I think the code for both will be completely different.
You're right. It should be separated, because there's no shared UI.
On Sat, 20 Jun 2009 09:31:46 +0200, "A.L.E.C" alec@alec.pl wrote:
Thomas Bruederli wrote:
Excellent idea. To configure it you suggest to use a local config file with in the plugin directory, right?
Implemented in r2664. Waiting for more drivers ;)
Hi,
I just made a small LDAP driver for password plugin. It is my very first open source participation, so feel free to inform me if i did something wrong. The driver uses PEAR Net_LDAP2 class for managing LDAP connection.
Additionnaly I wrote the French translation for password plugin.
Regards,
Edouard Moreau
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/qA/nn1jvXl2/password.zip http://detached.gigo.com/rc/qA/nn1jvXl2/fr_FR.zip Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/