Roundcube Community Forum

 

Password plugin for cPanel

Started by jigster, July 28, 2023, 04:55:03 AM

Previous topic - Next topic

jigster

I can't get the 'password' plugin to work with cPanel. I modified the plugin's 'cpanel' driver so that the username is the full email address (otherwise it errors). It also failed on the existing password check but commenting that out in the code works for now (for testing just to see if I can get the rest to work). Now, even though it says the password change succeeds, the password is never changed. If anyone else has done this recently, any instructions or help would be appreciated! Thanks

jigster

Ignore the above, I've got it working now, it was a typo! For any one else that needs this, all I did to the password plugin was set $config['password_driver'] = 'cpanel' and $config['password_cpanel_host'] = 'server hostname'. Then in drivers/cpanel.php I changed from this

$data = [
'email' => password::username('%l'),
'password' => $newpass
];


to this

$data = [
'email' => password::username('%u'),
'password' => $newpass
];