pt_BR Apanhei um monte no ISP 1.0.4, consegui com q funcionasse da seguinte formar, alterando o sql.php em /var/www/ispcp/gui/tools/roundcube/plugins/ispcp_pw_changer/drivers para :
En
I got a lot in the ISP 1.0.4, get with q works like this, changing the sql.php in / var / www / ispCP / gui / tools / roundcube / plugins / ispcp_pw_changer / drivers for:
Code:
<?php
/**
* SQL Password Driver
*
* Driver for passwords stored in ispCP database
*
* @version 1.0
* @author Sascha alias TheCry
*
*/
function password_save($passwd)
{
$rcmail = rcmail::get_instance();
$sql = "UPDATE `mail_users` SET `mail_pass` = %p, status = 'change' WHERE `mail_addr` = %u LIMIT 1";
if ($dsn = $rcmail->config->get('password_db_dsn')) {
// #1486067: enable new_link option
if (is_array($dsn) && empty($dsn['new_link']))
$dsn['new_link'] = true;
else if (!is_array($dsn) && !preg_match('/\?new_link=true/', $dsn))
$dsn .= '?new_link=true';
$db = new rcube_mdb2($dsn, '', FALSE);
$db->set_debug((bool)$rcmail->config->get('sql_debug'));
$db->db_connect('w');
}
if ($err = $db->is_error())
return PASSWORD_ERROR;
$sql = str_replace('%u', $db->quote($_SESSION['username'],'text'), $sql);
$sql = str_replace('%p', $db->quote($passwd,'text'), $sql);
$res = $db->query($sql);
if (!$db->is_error()) {
if ($db->affected_rows($res) == 1)
require('../../include/ispcp-functions.php');
send_request();
return PASSWORD_SUCCESS; // This is the good case: 1 row updated
}
return PASSWORD_ERROR;
}
?>
TheCry (author)
http://github.com/TheCry/ispCP-roundcube...rs/sql.php