Ok here is my script...
last line:PHP Code:require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
$host = "localhost";
$user = "myuser";
$accesshash = 'myaccesshash';
echo change_password($host,$user,$accesshash,1,$this_user,$new_pass);
$host,$user,$accesshash,1,$this_user,$new_pass
not:
$host,$user,$accesshash,1,$this_us er,$new_pass
(vbulletin bug?)
and here is my chage_password function that I've added to Accounting.php.inc
it'sPHP Code:function change_password ($host,$user,$accesshash,$usessl,$this_user,$new_pass) {
$result = whmreq("/scripts/passwd?password=${new_pass}&user=${this_user}",$host,$user,$accesshash,$usessl);
if ($cpanelaccterr != "") { return $cpanelaccterr; }
return $result;
}
$new_pass
not
$new_p ass
When I run the script from a cpanel theme directory (/usr/local/cpanel/base/frontend/x/change_pass.php), I don't get anything returned. But when I run the script from one of the accounts (/home/account/public_html/change_pass.php), everything works!
I need to run this script from a theme directory... any idea on what the problem is?



LinkBack URL
About LinkBacks
Reply With Quote




