Hi all
I need a few guiding steps for the change password plugin.
I have my users in a Mysql database but I don't understand how to use the plugin to get this working. The plugin talks about a macro called update_passwd which should contain a fairly simple sql query. I can make the sql query with out problems but where do I insert it??
Thanks!
--
/Thomas http://wiki.lnxgeek.org Go Ubuntu!!!
List info: http://lists.roundcube.net/users/
Thomas D. Dahlmann wrote:
I need a few guiding steps for the change password plugin.
I have my users in a Mysql database but I don't understand how to use the plugin to get this working. The plugin talks about a macro called update_passwd which should contain a fairly simple sql query. I can make the sql query with out problems but where do I insert it??
// The SQL query used to change the password. // The query can contain the following macros that will be expanded as follows: // %p is replaced with the plaintext new password // %c is replaced with the crypt version of the new password, MD5 if available // otherwise DES. // %o is replaced with the password before the change // %n is replaced with the hashed version of the new password // %q is replaced with the hashed password before the change // %h is replaced with the imap host (from the session info) // %u is replaced with the username (from the session info) // %l is replaced with the local part of the username // (in case the username is an email address) // %d is replaced with the domain part of the username // (in case the username is an email address) // Escaping of macros is handled by this module. // Default: "SELECT update_passwd(%c, %u)" $rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)';
What is not clear here?
// Escaping of macros is handled by this module. // Default: "SELECT update_passwd(%c, %u)" $rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)';
From the README: ---snip--- You can specify which database to connect by 'password_db_dsn' option and what SQL query to execute by 'password_query'. See main.inc.php file for more info. ---snip---
I was fooled by two things, the reference to main.inc.php which I simply couldn't understand (what should I look for in main.inc.php?) and the default setting "SELECT update_passwd(%c, %u)" which I didn't see as SQL - I simply don't know what update_passwd() is.
Somehow I couldn't get my wits to see that 'password_query' was the actual sql statement setting. Maybe if there was an example containing a MySQL statement I would have seen it right away.
What is not clear here?
-- /Thomas http://wiki.lnxgeek.org Go Ubuntu!!!
List info: http://lists.roundcube.net/users/