Author Topic: Password plugin for cPanel  (Read 6223 times)

Offline jigster

  • Newbie
  • *
  • Posts: 2
Password plugin for cPanel
« on: July 28, 2023, 04:55:03 AM »
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

Offline jigster

  • Newbie
  • *
  • Posts: 2
Re: Password plugin for cPanel
« Reply #1 on: July 28, 2023, 06:49:31 AM »
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

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

to this

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